cancel
Showing results for 
Search instead for 
Did you mean: 

Bug Report: HAL_UART_Receive_IT

konsolplus
Associate
Posted on August 22, 2016 at 07:24

Hello,

I am use STM32Cube ver. 4.16  and STM32F3xx HAL Driver version number V1.3.0.

When using HAL_UART_Receive_IT , during more than once unless you remove a communication cable 

: the program enters an IT IRQ infinite loop

During more than once unless you remove a communication cable

During more than once unless you remove a communication cable

3 REPLIES 3
Walid FTITI_O
Senior II
Posted on August 22, 2016 at 11:45

Hi yildirim.yi_it,

What kind of error you get then ? Is it overrun error ?

Since you have generated the code using CubeMx 4.16 , may you share you .ioc file.

-Hannibal-
konsolplus
Associate
Posted on August 22, 2016 at 13:45

Communication cable to plug and unplug several times , it IRQ endless loop.

Yes, errorcode = 8 Overrun.

Attach File .ioc

Communication cable to plug and unplug several times , it IRQ endless loop.

________________

Attachments :

USART1_F303.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Htcv&d=%2Fa%2F0X0000000aS8%2FqB9kUWFE.cCNHXxRe1aIct.KIrxwwOJ2MJ6DxwseZVs&asPdf=false
Walid FTITI_O
Senior II
Posted on September 16, 2016 at 15:11

Hi

yildirim.yi_it

,

It seems you have an overrun error due to pending interrupt.

In order to clear the pending interrupts we provide a specific macros in stm32f4xx_hal_uart.h file that can be used directly by the application (when needed).

Please refer to the Exported macro section in stm32f4xx_hal_uart.h file. The specific macro to clear the overrun pending interrupt is

__HAL_UART_CLEAR_OREFLAG()

Thus you can perform this to avoid overrun issue:

__HAL_UART_CLEAR_OREFLAG(…)
HAL_UART_Receive_IT(…)

-Hannibal-

Communication cable to plug and unplug several times , it IRQ endless loop.