FDCAN with STM32H735

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
Edoardo1982
Posts: 22
Joined: Thu Aug 03, 2017 8:39 am
Has thanked: 9 times
Been thanked: 17 times

Re: FDCAN with STM32H735

Postby Edoardo1982 » Mon Mar 31, 2025 1:39 pm

ych wrote:I encountered a limitation caused by the chThdSleepS(OSAL_MS2I(1)) delay in the FDCANv2 driver for STM32. A similar delay also exists in FDCANv1.

Due to this delay, I’m unable to send CAN FD frames faster than 1 kHz from a single thread, whereas my application requires a 2 kHz transmission rate.

Could someone explain the reason for this delay? Which STM32 chips are actually affected by the issue that this delay is intended to address?

I have checked errata and can't find any related issue.

In my case (STM32H723xx), I reduced the delay to chThdSleepS(OSAL_US2I(100)), and everything works flawlessly. From my perspective, it would be better to either completely remove the delay or keep it only for the specific chips that truly require it.


Hi, that delay was left over from a previous workaround.
I believe there's no issue in removing it.
Could you give me some feedback on how FDCAN works without that sleep?

Thanks

Edoardo

ych
Posts: 42
Joined: Tue Mar 03, 2015 11:38 pm
Has thanked: 9 times
Been thanked: 11 times

Re: FDCAN with STM32H735

Postby ych » Mon Apr 14, 2025 11:27 am

Edoardo1982 wrote:...
Could you give me some feedback on how FDCAN works without that sleep?
...


Hi Edoardo,

After a week in production without that sleep command, I haven't encountered any issues with FDCAN transmission.
It seems we can safely remove it.

The issue I encountered was due to a flaw in my code logic that accidentally relied on this hidden delay, rather than implementing a proper waiting mechanism.

Yurii.

User avatar
Edoardo1982
Posts: 22
Joined: Thu Aug 03, 2017 8:39 am
Has thanked: 9 times
Been thanked: 17 times

Re: FDCAN with STM32H735

Postby Edoardo1982 » Mon Apr 14, 2025 11:32 am

ych wrote:
Edoardo1982 wrote:...
Could you give me some feedback on how FDCAN works without that sleep?
...


Hi Edoardo,

After a week in production without that sleep command, I haven't encountered any issues with FDCAN transmission.
It seems we can safely remove it.

The issue I encountered was due to a flaw in my code logic that accidentally relied on this hidden delay, rather than implementing a proper waiting mechanism.

Yurii.


Thank you for your feedback, I remove that sleep from the code right away.

Edoardo


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 41 guests