FDCAN on STM32G431

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

Apache
Posts: 11
Joined: Sat Jan 30, 2021 7:31 pm
Has thanked: 1 time
Been thanked: 1 time

FDCAN on STM32G431

Postby Apache » Tue Jun 29, 2021 11:07 pm

Hello,

I've been developping an application on nucleo f303k3 which implements bxCAN. I ported the code to nucleo g431 but I'm not able to get a CAN signal out of the chip (other peripherals work fine). It looks like an init or a config problem, because when I try to send a CAN frame I always get a MSG_OK, event when the board is not plugged to a tranceiver. I checked the clocks and they seem ok, (using pll clk1 as input of the peripheral). I checked the pins alternate mode, seems ok too. I noticed that the CANTxFrame struct is different in the FDCAN implementation but it should be retro-compatible from what I've seen. And now I don't know where to look

I'm not sure of what information would be needed to get help, if you want more info please tell me.

ps: I am using the latest commit of the stable 20.3 on the github mirror

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: FDCAN on STM32G431

Postby Giovanni » Wed Jun 30, 2021 4:11 am

Hi,

The FDCAN is unfinished, there are patches to be added to it but I haven't had time to do that.

You may try to do that yourself, look at the end of this discussion: viewtopic.php?f=3&t=5122&start=80

Giovanni

Apache
Posts: 11
Joined: Sat Jan 30, 2021 7:31 pm
Has thanked: 1 time
Been thanked: 1 time

Re: FDCAN on STM32G431

Postby Apache » Wed Jun 30, 2021 8:15 am

In this thread you said that FDCAN driver should be working with CAN 2.0 frames. That's what I'm trying to do but I can't get it working. I tried the patch made by mck1117, it fixes some things in the init but it's behaving in the same way. Maybe that's my config that doesn't work?

I used this

Code: Select all

CANConfig const canConfig = {
    .DBTP = 0x100C20,
    .CCCR = 0,
    .TEST = 0,
};

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: FDCAN on STM32G431

Postby Giovanni » Wed Jun 30, 2021 8:33 am

Hi,

The driver has not been created by me, it is unfinished and untested so I cannot answer questions about it, try to post in the discussion thread I linked, people that are using it could answer there.

Giovanni

Apache
Posts: 11
Joined: Sat Jan 30, 2021 7:31 pm
Has thanked: 1 time
Been thanked: 1 time

Re: FDCAN on STM32G431

Postby Apache » Wed Jun 30, 2021 8:39 am

Ok, thank you!


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 13 guests