cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any limitation in the Controller core using CAN transmission and UART1/LPUART1 in parallel? What are the scenario the transmit error can occur in the transmit frame? -STM32G473CC controller

RUdha.1
Associate

Currently we are using STM32G473CC controller for one our project, where we using CAN module(CAN 2.0 mode) in operation along with peripheral like UART1/LPUART1 in operation.

We integrated CAN open stack on top of CAN driver for communication and in other side we use UART1 in operation. We are facing a problem that the CAN transmit error occurs when the UART1/LPUART1 is running in parallel to the CAN transmission. This in result the transmit error counter in FDCAN_ECR register increments and end up BUSOFF bit set.

If the UART1/LPUART1 is not in operation the CAN operation is stable.

Is there any limitation in the Controller core using CAN transmission and UART1/LPUART1 in parallel?

What are the scenario the transmit error can occur in the transmit frame?

1 ACCEPTED SOLUTION

Accepted Solutions
RUdha.1
Associate

Hi KnarfB,

Thanks for ur reply,

I found the issue its with in the code. i accidently setting the GPIO used for CAN termination. I was used the pin for debugging purpose but later changed for CAN STB. but forget change the pin setting.

So inside UART isr i toggle the pin which is implemented inside debug macro. once exclude the macro it works.

Its silly bug in code.

Thanks for your reply,

Br,

Rathinesan

View solution in original post

2 REPLIES 2
KnarfB
Principal III

The peripherals work highly independent, there are no built-in limitations. But, the single CPU core, internal busses and memories have to handle both concurrently. This can lead to timeouts or increased delays caused by interrupt handling. If you are using HAL, check every return code to detect timeouts etc... If you are using other libraries or register level, check error conditions as early as possible. Are you using interrupts?, DMA?

A logic analyzer/CAN protocol analyzer may be a great help for analyzing protocol errors. Transmit error sounds like something is wrong on th CAN bus side?

hth

KnarfB

RUdha.1
Associate

Hi KnarfB,

Thanks for ur reply,

I found the issue its with in the code. i accidently setting the GPIO used for CAN termination. I was used the pin for debugging purpose but later changed for CAN STB. but forget change the pin setting.

So inside UART isr i toggle the pin which is implemented inside debug macro. once exclude the macro it works.

Its silly bug in code.

Thanks for your reply,

Br,

Rathinesan