STM32H743 FDCAN stuck in init mode

Hello, I ran into a problem when trying to configure FDCAN1 in STM32H743VIT6 (board is weact_mini_h743vitx, issue happens both with cmsis and stm32cube frameworks) - I’m not able to clear the INIT bit in FDCAN Control (CCCR) register. Turns out after enabling RCC clock for the peripheral, in FDCAN interrupt register (IR) the “Access to reserved address” (ARA) is set - even if the program should only set the FDCANEN flag in RCC’s APB1HENR register.

After hours of debugging, it turns out in CubeIDE and Keil uVision everything works with the same code - no “access to reserved address” flag and the init bit clears itself properly.

Do any of you ran into a similar problem or have any idea what could cause such a problem?

Can you provide both the minimal working native STM32Cube project and the PlatformIO project? You might be missing some build settings / macros that make it behave differentely, even if all .c/.h files are the same.

Or, there’s a problem with an outdated / differeing STM32Cube framework version that PlatformIO is using versus what you’re using with the CubeIDE.

Sure, here they are: https://drive.google.com/drive/folders/1lhtGujYexZmLB9w9mXYhoyF-CurxMiLa?usp=sharing