Ok, so here's the deal: I'm working on the implementation of the 802.14.5 security spec for the telos platform. I need to do a memory write in the middle of a readRXFIFO() function like this: 1) read out the header info making sure not to read out any of the data 2) build the nonce and write it into memory 3) call security decryption strobe (the correct nonce HAS to be written by this time) 4) read out the now decrypted and authenticated data
All of this has to happen in the readRXFIFO() function of the HPLCC2420M.nc file. If I do an asynchronous HPLCC2420RAM.write() in step 2) above, then I can continue steps 3) and 4) in another function which will be called from the writeDone() callback. However, this does not work because the readRXFIFO() function will end up returning before the post of the writeDone() is called. readRXFIFO() will return and I will never see the packet. Since we do not have a "real" thread architecture in the os, I do not currently see a solution to this problem if I use asynchronous memory writes. Question: Can I do a HPLCC2420RAM.write() call in step 2) above and ignore the writeDone() callback? I realize that alternate platform implementations bind us to a common interface, but I am dealing with the telos platform in particular. Or is it critical that I wait for the callback? The chipcon docs dont seem to specify a need for any special behavior when dealing with memory access (beyond that of csn considerations). Can I ignore the HPLCC2420RAM.writeDone(), just assuming it completes on return of the HPLCC2420RAM.write() command (just for telos)? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Polastre Sent: Monday, December 05, 2005 9:13 PM To: Séva Safris Cc: [email protected] Subject: Re: [Tinyos-help] Telos synchronous memory io yes, the reason they are async because alternate implementations use DMA or interrupt driven approaches. -Joe On 12/5/05, Séva Safris <[EMAIL PROTECTED]> wrote: > Hi all. The telos platform implementation of HPLCC2420RAM.write() and > HPLCC2420RAM.read() in the HPLCC2420M.nc file use a callback mechanism to > notify readDone() and wrietDone() events. > > I need to know if there is an underlying reason for this asynchronous > behavior?! Frankly, I need a synchronous implementation of the read() and > write() functions and I am wondering if this is possible. > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
