Page 5 of 5
Re: FDCAN with STM32H735
Posted: Mon Mar 31, 2025 1:39 pm
by Edoardo1982
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
Re: FDCAN with STM32H735
Posted: Mon Apr 14, 2025 11:27 am
by ych
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.
Re: FDCAN with STM32H735
Posted: Mon Apr 14, 2025 11:32 am
by Edoardo1982
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
Re: FDCAN with STM32H735
Posted: Tue Apr 22, 2025 8:42 am
by ych
Edoardo1982 wrote:...
Thank you for your feedback, I remove that sleep from the code right away.
Edoardo
Would it be possible to remove it as well from at least the latest stable version, [font=Courier New]stable_21.11.x[/font]?
Re: FDCAN with STM32H735
Posted: Wed Apr 23, 2025 6:04 pm
by Edoardo1982
ych wrote:Edoardo1982 wrote:...
Thank you for your feedback, I remove that sleep from the code right away.
Edoardo
Would it be possible to remove it as well from at least the latest stable version, [font=Courier New]stable_21.11.x[/font]?
Sure,
I'll do it in the next few days.
Edoardo