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.

关于宏定义HAL_BOARD_INIT()中时钟初始化问题的讨论,我希望能得到TI员工的较为明确且准确的解答,毕竟这个问题困扰了我好久。

Other Parts Discussed in Thread: CC2430, CC2530

在协议栈Z-Stack2.5.1a中,文件hal_board_cfg.h中有如下宏定义

#define HAL_BOARD_INIT() \
{ \
uint16 i; \
\
SLEEPCMD &= ~OSC_PD; /* turn on 16MHz RC and 32MHz XOSC */ \
while (!(SLEEPSTA & XOSC_STB)); /* wait for 32MHz XOSC stable */ \
asm("NOP"); /* chip bug workaround */ \
for (i=0; i<504; i++) asm("NOP"); /* Require 63us delay for all revs */ \
CLKCONCMD = (CLKCONCMD_32MHZ | OSC_32KHZ); /* Select 32MHz XOSC and the source for 32K clock */ \
while (CLKCONSTA != (CLKCONCMD_32MHZ | OSC_32KHZ)); /* Wait for the change to be effective */ \
SLEEPCMD |= OSC_PD; /* turn off 16MHz RC */ \

……

如果大家看过CC2430用户手册的话,上面的可能就比较容易理解,因为里面有关于寄存器SLEEP的描述

但是CC2530用户手册中关于寄存器SLEEPCMD ,SLEEPSTA 的描述却是如下图

我感到很困惑,这种情况我该怎么理解呢,是按CC2430的理解吗,但是寄存器的描述与CC2530不符啊,还是有新的解释?

最关键的是代码中或手册中不做任何解释,这让人感觉很无语。