Page 1 of 5
FDCAN with STM32H735
Posted: Tue Jul 18, 2023 3:52 am
by hybridA
Started porting our F4 application to H7 and found that CAN wasn't happy:
stable_21.11.x, as of today.
RT-STM32H735IG-DISCOVERY demo
halconf.h:
mcuconf.h:
Code: Select all
#define STM32_CAN_USE_FDCAN1 TRUE
#define STM32_CAN_USE_FDCAN2 TRUE
Code: Select all
../../../os/hal/ports/STM32/LLD/FDCANv1/hal_can_lld.c: In function 'can_lld_start':
../../../os/hal/ports/STM32/LLD/FDCANv1/hal_can_lld.c:309:16: error: 'FDCAN_GlobalTypeDef' has no member named 'RXGFC'; did you mean 'GFC'?
309 | canp->fdcan->RXGFC = canp->config->RXGFC;
| ^~~~~
| GFC
make: *** [../../../os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk:193: build/obj/hal_can_lld.o] Error 1
make: *** Waiting for unfinished jobs....
Re: FDCAN with STM32H735
Posted: Tue Jul 18, 2023 7:53 am
by Giovanni
Hi,
H7 has a different FDCAN apparently, that would require creation of a FDCANv2 driver.
Giovanni
Re: FDCAN with STM32H735
Posted: Wed Jul 19, 2023 4:11 am
by hybridA
Is this planned already or would this be a new implementation? Since this is pretty critical for us I don't mind paying for it. Also, the H735 has 3x CAN. Thank you
Re: FDCAN with STM32H735
Posted: Wed Jul 19, 2023 7:32 am
by Giovanni
Hi,
It is not planned yet, just on the "to-do" list. Probably it is not very different from the G4 implementation.
Giovanni
Re: FDCAN with STM32H735
Posted: Fri Apr 26, 2024 2:02 pm
by alex31
Hello, any news on this front ?
FDCANv1 is the G4 FDCAN ?
Will take a look of the respective register maps of FDCAN G4 and FDCAN H7
Alexandre
Re: FDCAN with STM32H735
Posted: Fri Apr 26, 2024 3:46 pm
by Giovanni
Hi,
An implementation will be added soon, some testing will be appreciated.
Giovanni
Re: FDCAN with STM32H735
Posted: Mon Apr 29, 2024 6:48 am
by alex31
No problem for the testing, thanks.
Saw that the compile problem is just for one line that copy user provided value in a register, for the H7, the register name and fields are different, will try a a stupid fix with some conditionnal compilation directive to see if the actual driver work on H7 and will report here my finding.
Alexandre
Re: FDCAN with STM32H735
Posted: Mon Apr 29, 2024 8:59 am
by Edoardo1982
alex31 wrote:No problem for the testing, thanks.
Saw that the compile problem is just for one line that copy user provided value in a register, for the H7, the register name and fields are different, will try a a stupid fix with some conditionnal compilation directive to see if the actual driver work on H7 and will report here my finding.
Alexandre
I am testing the fix for H7 CAN. I will release it in the coming days.
Re: FDCAN with STM32H735
Posted: Mon Apr 29, 2024 9:36 am
by alex31
I am testing the fix for H7 CAN. I will release it in the coming days.
Nice !
If you have some example code for FDCAN, that would also be handy since there is no testhal example right now
Alexandre
Re: FDCAN with STM32H735
Posted: Mon May 13, 2024 12:31 pm
by Edoardo1982
alex31 wrote:I am testing the fix for H7 CAN. I will release it in the coming days.
Nice !
If you have some example code for FDCAN, that would also be handy since there is no testhal example right now
Alexandre
I committed the FDCANv2 driver for STM32H7 to both trunk and branch 21.11.x. Additionally, I added a sample demo using events. It's also possible to receive directly using the canReceive function with TIME_INFINITE.
For any further information, please contact me.
Edoardo