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.

SLEEPCMD

Other Parts Discussed in Thread: CC2530, CC2430, CC2540

The sample code for CC2530 uses exhaustively  SLEEP_OSC_PD_BM (value ix 0x04).

again its there in Figure 4-1. Clock System Overview.  (SLEEPCMD.OSC_PD)

But, OSC_PD is not defined in the register definition of SLEEPCMD.

Can some help me with the purpose of SLEEP_OSC_PD_BM used in the clockSetMainSrc () or pointers to what is this bit mask really achieving?

  • Hi Willy.

    Do not know the sample code that well, but you need to update the User Guide. The latest version do not have this in Figure 4-1 and the bit set with this mask is set as Reserved. Always write as 1.

    Regards,
    Kjetil

  • thank Kjetil.

    I noticed that very late. thanks anyways. But still don't understand the code. The comments and code are not in sync.

    Regards,

    Willy

  • Not sure what code you are looking at but best guess is that this is a left-over from previous code / chips (CC2430) where this bit had a meaning. Believe that in the CC2530 the clock not selected will automatically be powered down and that this bit/functionality was rendered useless.  Previously this was a 'manual' job.

    Regards,
    Kjetil

  • The same SLEEPCMD register issue exists with the CC2540.  Version 1.1 of the CC2540 Bluetooth Low Energy Software Development Kit (CC2540 BLE v1.1) references OSC_PD as bit-2 of the SLEEPCMD register in the hal_board_cfg.h and hal_mcu.h files.  The User's Guide shows bit-2 of the SLEEPCMD register as Reserved (reference page 63 of SWRU191B (Sep 2010).