Other Parts Discussed in Thread: CC2500
Hi,
I need to transmit 30 bytes in every 2 milliseconds continuously. My transmit function is in the TA ISR. The MCUs master clock is at 8MHz, SPI clock is 8 MHz too. In the ISR, I upload the TXFIFO with 30 bytes, strobe STX , wait for transmission to be done, then strobe an SCAL. To optimize my code, I placed PxOUT 'markers' in the ISR to pull up and low a dedicated pin thus I can measure the time periods of code sections with a scope. However, my results are rather strange. The measured time frames are the following (starting from t1 since t0 is not implemented yet):
t0 - read out 30 bytes from an external SPI device (unknown)
-----------------------------------------------------------------
t1 - upload 30 bytes to FIFO 265 us
t2 - send strobe STX 115 us - pretty high
t3 -CC2500 IDLE>TX 160 us instead of 88.4 us
t4 - TX 484 us that's fine
t5 - TX>IDLE N/A the datasheets gives 0.1 us
t6 - send strobe SCAL 114.6 us - pretty high
t7 - IDLE>SCAL N/A but would be nice to know
t8 - SCAL can't measure it but the datasheet gives 721 us
t9 - SCAL>IDLE N/A but would be nice to know
I understand that t1, t2 and t6 periods merely depends on my code which could be optimized. The total known time is 1860 us which is dangerously close to 2000 usecs, where the next cycle should come and t0 is still not included yet. The calibration takes place from t7 to t9 and it has to be finished by t1, theoretically. My questions are:
What happens when CC2500 is still calibrating when I start to upload the TXFIFO? If it works in parallel, I'll have an extra 265 us time period before strobing STX.
Why has t3 such a double value of 160 us?
Is there a way to capture the end of the calibration procedure ?(there is no similar way like TX/RX at GDO0)
Any help would be greatly appreciated.