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.

如何设置主晶振为内部16M?

Other Parts Discussed in Thread: CC2530

如题,ZSTACK1.2.0

我在设置32m外部晶振的预定义处改为使用内部16m,发现串口只能发不能收了?

  • 请问您是如何修改的? CC2530有四个晶振,两个内部(16M RC晶振,32K RC晶振),两个外部(32.768K的石英晶振,32M的石英晶振) 外部的32.768石英晶振也可以不接,但是RF工作时必须选择32MHz crystal oscillator。 建议您最好还是使用32M的晶振

  • hal_mcu.h文件中

    #define CLKCONCMD_32MHZ  (CLKSPD(1) | TICKSPD(1) | OSC)

    然后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 */   \  

    /*不关闭内部16M*/                                                               \

     /* Turn on cache prefetch mode */                              \  

    PREFETCH_ENABLE();                                             \

    }

    急!!!!这是我做的方法,TI方法是???