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.

a problem about BLE cc2541 clock init

Other Parts Discussed in Thread: CC2541

#define START_HSOSC_XOSC()                                                    

\ {                                                                             

 \   SLEEPCMD &= ~OSC_PD;           

 /* start 16MHz RCOSC & 32MHz XOSC */      

   \   while (!(SLEEPSTA & XOSC_STB));

 /* wait for stable 32MHz XOSC */             \ }

#define STOP_HSOSC()                                                          

 \ {                                                                             

 \   SLEEPCMD |= OSC_PD;            

/* stop 16MHz RCOSC */                      

\ } /* ----------- Board Initialization ---------- */

#define HAL_BOARD_INIT()                                     

    \ {                                                              

  \    /* Set to 16Mhz to set 32kHz OSC, then back to 32MHz */      

 \   START_HSOSC_XOSC();                                         

   \   SET_OSC_TO_HSOSC();                                           

 \   SET_32KHZ_OSC();                    

 \   SET_OSC_TO_XOSC();                                         

    \   STOP_HSOSC();       

i want to know  the macro "START_HSOSC_XOSC()",i refer to the cc2541 usr guide ,but i don't relate this implement of  "START_HSOSC_XOSC()" to cc2541 datasheet。 i even doublt that the clock operation is wrong !!!

  • Hello Gzz,

    Just what exactly seems to be the problem?  

    If you want to test the macro, then you can put a break after it and observe the clock registers.  You can also use your scope to observe that the clocks start nd stop.

    Thanks,