You are here

Porting to a newer STM32

5 posts / 0 new
Last post
TechAUmNu
Offline
Last seen: 3 weeks 3 days ago
Joined: 2017-09-22 01:27
Posts: 575
Porting to a newer STM32

So I was doing some digging on the new STM32 chips, looking for something that would allow the firmware to run at over 60khz. 

This looks like a really good fit: STM32H743

https://www.st.com/content/st_com/en/products/microcontrollers-microproc...

It's 4x faster, smaller (0.8mm BGA) and has a bunch of extra onboard features that would make it excellent for running a motor controller at much higher frequency, the idea being that we might be able to get switching up to a speed where GaN makes a bit more sense and all the big electrolytic can be removed. 

AFAIK the only thing stopping VESC going faster is running out of processing power on the little M4 core, I think the peripherals are good enough to go faster.

Obviously doing the port is going to be quite involved, version 19 of ChibiOS supports the H7xx chips so I think its more a case of moving VESC code to that version. After that its probably not too difficult to change to a different chip. I am a bit confused why we are still using a version of ChibiOS from like 2015. 

I have ordered a Nucleo board for the STM32H753ZI (same as the 743 but has a crypto module) so I can start looking at this. Fingers crossed it's not months of work! If anyone wants to help that would be grand.

pec STM32F405RG STM32H743
Clock speed 168MHz (210DMIPS) 480MHz (1027DMIPS)
Flash 1MB 1MB-2MB
RAM 192kB 1MB 
ADC 3x 12bit 2.4MSPS (7.2MSPS) 3x 16bit 3.6MSPS (10.8MSPS)
Timers 2x 16bit Motor Control Timers (168MHz) 2x 16bit Motor Control Timers (240MHz)

 

Eric
Offline
Last seen: 1 year 4 months ago
Joined: 2017-08-28 10:27
Posts: 16

It is months of work, someone tried but abandoned the idea, look at https://github.com/vedderb/bldc/issues/181

He got the latest ChibiOS to run but it was too much work to change the drivers.

TechAUmNu
Offline
Last seen: 3 weeks 3 days ago
Joined: 2017-09-22 01:27
Posts: 575

Oh neat, that will save me a huge amount of time!

My reading of that is he got it to work on the hardware he wanted and had no reason to do the driver change. If that's all that's needed I can do that fine. Will get his code and have a play.

ka_ru
Offline
Last seen: 2 weeks 3 days ago
Joined: 2020-10-13 11:38
Posts: 14

I am very interested in the question of raising the PWM frequency. I want to use 100kHz and above. I can help with checking the code for STM32H743. Is work moving in this direction? I have an inverter (Gallium Nitride (GaN) ICs and Semiconductors – EPC (epc-co.com)) and  I can connect to STM32H743. :)  

Andrew.

STEPHY AKKARA
STEPHY AKKARA's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2021-07-28 08:00
Posts: 1

Hi 

Can you please tell the specification of which STM family VESC replaced 

STEPHY