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.

CC2530: cc2530

Part Number: CC2530


Hi everyone,

I have a question need your help.

I use cc2530 with 32-MHz XOSC oscillator and no 32-kHz XOSC. But I forget to set OSC32K_CRYSTAL_INSTALLED to FALSE, in the code, 32-kHz clock-source select the 32 kHz XOSC(in fact, this external Crystal oscillator does not weld to board)。

What puzzled me is, it works!  the module can send out  beacon and can join network.

In my understand, as the 32 kHz XOSC does not exist, the sentence "MAC_RADIO_TIMER_WAKE_UP();" in macMcuInit(void)  would go to  infinite loops.Because what describe in "CC2530_user's_guide"-22.4.2 

"

22.4.3 Timer Synchronous Start
When the timer is in the IDLE mode, it is started synchronously by writing 1 to T2CTRL.RUN when
T2CTRL.SYNC is 1. After T2CTRL.RUN has been set to 1, the timer remains in the IDLE mode until the
32-kHz clock rising edge is detected. When this occurs, the timer first calculates new values for the 16-bit
timer value and for the 24-bit timer overflow count, based on the current and stored Sleep Timer values
and the current 16-bit timer values. The new Timer 2 and overflow count values are loaded into the timer,
and the timer enters the RUN mode. T2CTRL.STATE = 1 indicates that the module is running. This
synchronous start process takes 86 clock cycles from the time when the 32-kHz clock rising edge is
sampled high. The synchronous start-and-stop function requires that the system clock frequency is
selected to be 32 MHz. If the 16-MHz clock is selected, an offset is added to the new calculated value.

"

(

in code:

#define MAC_RADIO_TIMER_WAKE_UP()  st( st( while (CLKCONSTA != (CLKCONCMD_32MHZ | OSC_32KHZ)); ); \
T2CTRL |= (TIMER2_RUN | TIMER2_SYNC); \
while(!(T2CTRL & TIMER2_STATE)); )

)

so how it work?

Because 32-kHz xosc no exist and i choose to use 32-khz xosc in code, it could not happend to detect the 32-kHz clock rising edge. As no rising edge, "while(!(T2CTRL & TIMER2_STATE) "sentence should have gone to infinite loops, so the device should not have sent the beacon.