cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L475 and URC's management via UART

dtarrago
Senior

Hello,

I'm managing a Wifi modem using one of the USARTs of the STM32L475.

Modem is working fine when sending and receiving AT commands and data, but I'm not able to receive URC's.

I only receive URC's when they come 'together' (very close) to the answer of a AT command.

But if do not receive any URC when micro is not asking nothing: in this case, micro has RX IRQ activated (HAL_UART_Receive_IT(...)), and micro enters into the HAL_UART_RxCpltCallback when receiving data, but no URC is received --> The only character received at this time is either 0x0A or 0x0D.

Any suggestion in managing URCs?

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
dtarrago
Senior

Already solved: it was a problem related to UART characters reception treatment in my interrupt rutine.

Regards.

View solution in original post

4 REPLIES 4
Andrew Neil
Evangelist III

"URCs" as in "Unsolicited Result Codes" ?

 


@dtarrago wrote:

I only receive URC's when they come 'together' (very close) to the answer of a AT command.


Does your STM32 "sleep" - so that it's not ready for anything coming in ?

 

Addendum:

 


@dtarrago wrote:

The only character received at this time is either 0x0A or 0x0D.


A URC will begin with a CRLF lead-in - is your code seeing that as the end of a message, instead of waiting for the rest of the URC ... ?

🤔

 

Receive data into a FIFO / Ring Buffer, and process periodically?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dtarrago
Senior

Already solved: it was a problem related to UART characters reception treatment in my interrupt rutine.

Regards.

That's good - so please mark this as solved.

It would be helpful for future readers if you could describe what was wrong, and how you found it ...