[DEV] STM32G4xx support

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
MasterSpoon
Posts: 6
Joined: Fri Aug 27, 2021 7:43 am
Has thanked: 1 time
Been thanked: 3 times

Re: [DEV] STM32G4xx support

Postby MasterSpoon » Fri Aug 27, 2021 7:50 am

Not sure if this is the correct place to ask but it is about STM32G4xx support.

Is there a current ETA on when the STM32G491xx and STM32G4A1xx range will be supported by ChibiOS ?

They are the higher capacity variants of the STM32G431xx's which are already supported and sit between the G431 and G471 in terms of features.
https://www.st.com/en/microcontrollers- ... 2g4x1.html

I can see the header files are already available from ST
https://github.com/STMicroelectronics/S ... xx/Include

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

Re: [DEV] STM32G4xx support

Postby Giovanni » Fri Aug 27, 2021 7:52 am

Hi,

Problem is availability of HW mainly.

Giovanni

preisi
Posts: 3
Joined: Mon Sep 27, 2021 2:48 pm
Has thanked: 2 times

Re: [DEV] STM32G4xx support

Postby preisi » Mon Sep 27, 2021 2:55 pm

Hello,
recently I've been trying to get FDCAN to work with a STM32G474 but so far, I didn't succeed. Thus, I was wondering what the current state of FDCAN for STM32G4xx actually is. Reading through this thread was not very conclusive in my opinion (at some point people only wrote about STM32Hxxx support?).
Therefore my question: Is FDCAN already working with STM32G4xx on upstream? If that's the case, is there any working example/documentation?
Best regards,
preisi

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

Re: [DEV] STM32G4xx support

Postby Giovanni » Mon Sep 27, 2021 3:59 pm

Hi,

FDCAN is not yet functional, several people have proposed patches but none has yet been integrated or tested.

Giovanni

preisi
Posts: 3
Joined: Mon Sep 27, 2021 2:48 pm
Has thanked: 2 times

Re: [DEV] STM32G4xx support

Postby preisi » Tue Sep 28, 2021 12:01 pm

Hello,
thanks for your response. At least now I know why it didn't work :D
Is at least 'normal' CAN functional at the moment?
Best regards,
preisi

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

Re: [DEV] STM32G4xx support

Postby Giovanni » Tue Sep 28, 2021 12:40 pm

Hi,

The normal CAN driver works but that peripheral is not present on the G4 family.

Giovanni

Guillaume227
Posts: 15
Joined: Tue Apr 18, 2017 6:52 pm
Has thanked: 10 times

Re: [DEV] STM32G4xx support

Postby Guillaume227 » Wed Sep 29, 2021 6:31 pm

I am wondering about ADC5 support : I see earlier in this thread that support was not added at the same time as ADC 1...4. What's different about ADC5 that we can't mimic what's been done for the other ADC in its group, namely ADC3 and ADC4?

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

Re: [DEV] STM32G4xx support

Postby Giovanni » Wed Sep 29, 2021 6:47 pm

Guillaume227 wrote:I am wondering about ADC5 support : I see earlier in this thread that support was not added at the same time as ADC 1...4. What's different about ADC5 that we can't mimic what's been done for the other ADC in its group, namely ADC3 and ADC4?


There is nothing preventing it except it could not be used in dual mode because there is no ADC6.

Giovanni

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

Re: [DEV] STM32G4xx support

Postby Apache » Sat Feb 19, 2022 5:54 pm

mck1117 wrote:I just had a look at this diff, and it looks like I actually already made all these changes in my branch, except for adding the call to fdcan_clock_start. Do you really need to add that? It works just fine on an H7 (same IP from Bosch) exactly as it is on my fork (https://github.com/mck1117/chibios/tree/h7-fdcan).


I base my work on yours, but it still didn't wor for my mcu (STM32G431). I activated the asserts and realized that the clock was not started after configuring the peripheral. It don't understand why it worked on your side :lol:

I just added the clock start to your fixes and it started working right away. So the diff I sent is just your diff with that enhancement

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

Re: [DEV] STM32G4xx support

Postby Apache » Tue Apr 26, 2022 1:55 pm

Hello everyone,
I noticed a new problem in the implementation of the low level driver: it doesn't handle extended IDs. I quick fixed it so I could use it but I didn't code a clean fix yet. If anyone has the same problem, the fix is to set the bit 30 of the TX buffer, which allows the peripheral to send extended IDs.

tx_buffer.png


At some point I'll be back with a real patch and we'll be able to discuss it.

Greets


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 9 guests