cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, Please suggest a Software solution where I can power on the entire LPUART1 peripheral on STM32L4 only when I want. Any data received on the UART lines before I power on the LPUART1 must in no way be accessible to the MCU

Grang
Associate

Hello, 

 I have an issue with LPUART communication on my custom board housing STM32L4 MCU. I have a peripheral connected to the LPUART1 lines. This peripheral is quectel MC60 GSM module. I am turning the module on from STM32L4 (by toggling a GPIO). After turn the GSM module ON, I have configured a UART receive with interrupt. 

The interrupt triggers immediately with the UART receive buffer filled with some message which is transmitted by MC60 (this cannot be disabled). 

However, my concern here is the data was actually transmitted by MC60 much before the HAL_UART_Receive_IT was called. 

1. Why is the MCU receiving the data on UART even if I have not called the uart_receive API?

2. I have tried a work around where I would turn on GSM module, wait 1.8 seconds and then MX_UART_INIT(); . Even this did not solve my problem. 

3. The MC60 transmits that message at a baud rate of 115200 and I have configured my LPUART at 9600 baud rate. Even this does not solve the problem. 

Please suggest a fix where I can power on the entire LPUART1 peripheral only when I want. Any data received on the UART lines before I power on must in no way be accessible to the MCU. 

0 REPLIES 0