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.

CC2511: 使用外部24Mhz晶振和外部32.768Khz晶振的情况下,上电系统时钟怎么初始化?

Part Number: CC2511
我的上电时钟初始化代码,不知道为什么这样设置波特率115200一直输出不正确。
void OSC_Init(void)
{
  CLKCON &= ~0x40;
  while(SLEEP&0x40);
  CLKCON &= ~0x41;
}
void Usart0_Init(void)
{
    IEN0&=0x7f;
    PERCFG&=0xfe;
    P0SEL=0x0c;         //P0.2-P0.3为外设,其余为通用io      
    P2DIR&= ~0XC0;
    U0CSR=0x80;
    U0UCR=0x00;

    U0GCR=0x20;        
    U0GCR|=0x0c;        //115200
    U0BAUD=216;
    UTX0IF=0;
    URX0IF=0;
    URX0IE=1;
    EA=1;
}
请问怎么设置时钟,或者是我串口0初始化设置错了吗?