This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Sampling question

Guru 18595 points
Other Parts Discussed in Thread: CC2540

Hi,

I have a secondary RF receiver on pin p0.6 of my BLE keyfob. I have been trying to read what I'm sending from a transmitter (a command consisting of the "hello" string) but I have not succeded.

Since the CC2540 does not include timers anymore, I have a few questions. I'm able to detect the interrupt on the pin but, afterwards, I usually started a timer in charge of receiving the frames at the same rate they are sent (for example, 400us per bit).

1) The osal_timer cannot be more precise than 1ms?

2) How could I perform this with the old timer style? Should I discard this option? I have no problem working at 1ms but by resending a RECEIVED_BIT_EVENT_FROM_RF from within the interrupt and getting the P0.6 value during all the frame time seems to not work.

 

Thanks a lot!

  • The OSAL timer only has precision of 1ms; however the CC2540 does support use of the hardware Timers 1, 3, and 4. Timer 2 cannot be used by the application, as the BLE stack uses this. More information on these timers can be found in the CC2540 user guide.