AnsweredAssumed Answered

KL15Z128 UART not working in RUN Mode

Question asked by Shre jjjhh on Aug 29, 2018
Latest reply on Sep 9, 2018 by Jing Pan

Hi  am using KL15Z128 in RUN mode. But I the code gets stuck in UARTEnableRxInterrupt (). Please see the code below:

//------------------------------------------------------------------------------------//

void main()

{

  ClockConfigBootClockRUNMode();

 //ClockConfigBootClockVLPRMode();       //it works


  UARTInit();     // Initialize UART port 

 

  UARTEnableRxInterrupt ();  // Enable Rx Interrupt

}

void UARTInit(void)

{

   lpsci_config_t ltUARTConfig;

   LPSCI_GetDefaultConfig(&ltUARTConfig);
   ltUARTConfig.stopBitCount = 0;
   ltUARTConfig.baudRate_Bps = 9600;
   ltUARTConfig.parityMode = 3;
   ltUARTConfig.enableRx = 1;
   ltUARTConfig.enableTx = 1;
   

   //Initialize UART Peripheral
   Chip_UART_Init(&ltUARTConfig);

   /* Enable interrupt in NVIC. */
   EnableIRQ(UART0_IRQn);       

}

//-----------------------------------------------------------------------------//

 

However the above code works well with VLPR Mode. Attached here the ClockConfig.c file for different configurations of RUN mode and VLPR mode.

 

Regards,

shreekant

Attachments

Outcomes