You are here

Porting VESC to STML4

1 post / 0 new
Vince_1618
Offline
Last seen: 2 years 1 month ago
Joined: 2022-10-28 13:20
Posts: 1
Porting VESC to STML4

Hi,

I am trying to port VESC firmware on STML4 controller with more recent version of ChibiOs.

I am using STM with frequency of 120MHz with one ADC which can work on 120MHz,  I am using only foc control and have an issue with current control and current measurements.

When I try to start motor with current control current is constantly increasing until ABS_OVER_CURRENT fault is triggered, also when I start motor with duty control and turn on real time data motor current is fluctuating a lot.

My ADC vector looks like this:/*

* ADC Vector
*
* 0 (1): IN1 SENS1
* 1 (2): IN2 SENS2
* 2 (3): IN3 SENS3
* 3 (4): IN13 CURR1
* 4 (5): IN12 CURR2
* 5 (6): IN11 CURR3
 
The calculation time in DMA interrupt is around 40 microseconds.
 
So is it possible to control motor in foc mode with only one ADC and 30% less computing power or triple ADC is needed?
 
Thanks in advance !