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: How to initialize the power on system clock when using an external 24Mhz crystal oscillator and an external 32.768Khz crystal oscillator?

Part Number: CC2511

Hi,team:

The following is the code I initialized:

May I ask what is the configuration for using an external clock? I have a problem configuring the serial port baud rate to 115200 when using an external clock.

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;
}