2019-07-02 01:57 AM
Hello,
We are working on implementing a custom FOC control for hoveboards on the stock boards that feature an STM32F103RCT6 with 2 phase current measurement.
However, we encounter issues when measuring the Phase currents. They appear to be noisy with high peaks (see attached picture).
https://user-images.githubusercontent.com/24780745/60458354-b0d27a00-9c3e-11e9-99ca-e87e29aa17ed.png
The problem could be that we do not trigger the current measurement at the right moment, when the lower MOSFET is conducting.
Thus, I am asking if you can review the settings for the DMA interrupt by the timer?
More exactly, to review the following files:
master/Src/setup.c
master/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc_ex.h
All the files can be found on github (along with the full project) here:
https://github.com/EmanuelFeru/hoverboard-firmware-hack
EDIT: For more details, there is an open issue on this topic on github:
https://github.com/bipropellant/bipropellant-hoverboard-firmware/issues/41
We would greatly appreciate it.
Thank you in advance!
Solved! Go to Solution.
2019-07-12 01:30 PM
Hello Guys,
I prepared on my free time a small documentation. Be aware that it is not an ST documentation, just a collection of hints that are used in the MCSDK.
I think it will allow you to understand how things are plumbed together. I really advise you to generate a project single drive 3 shunts for STM32F1 and a dual drive 3 shunts / 3 shunts for STM32F4. We do use cubeMX to generate the project tree and all the initialization of the peripherals. Open the generated IOC file with cubeMX is also a nice way to understand how things are configured.
Hope it helps
Regards
Cedric