Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The board amcbldc upgrades its low level HW motor driver #355

Merged
merged 9 commits into from
Mar 31, 2023
Merged

The board amcbldc upgrades its low level HW motor driver #355

merged 9 commits into from
Mar 31, 2023

Conversation

marcoaccame
Copy link
Contributor

@marcoaccame marcoaccame commented Mar 7, 2023

This PR upgrades the amcbldc project to use a new low level HW motor driver, the so called motorhal.

The motorhal is code written on top of the ST HAL library which configures and uses HW peripherals such ADC and TIM to read currents, voltages and to produce the PWM for the motor.

The new motorhal2 has been improved over the legacy motorhal to use a new version of ST HAL and some improved configurations of the HW peripherals.

At the same time the legacy driver has been mildly refactored.

The new project can use either the legacy or the new driver to enable comparative tests.

In the following figure is show what has changed.

   ---------------------------
  | model based motor control | <- unchanged
   ---------------------------
  | embot::hw::motor          | <- almost unchanged
   ---------------------------  
   ---------------------------
  | motorhal                  | <- either motorhal or motorhal2
   ---------------------------  
   ---------------------------
  | STM HAL                   | <- either v120 or v122
   --------------------------- 
   

Figure. Changes in the motor control stack in amcbldc.

Tests

Test were performed and showed similar behaviour w/ the previous HW motor drivers. So we can safely merge. In any case, I have kept the previous drivers as an alternative target in the amcbldc project.

@marcoaccame marcoaccame marked this pull request as draft March 7, 2023 13:38
@sgiraz
Copy link
Contributor

sgiraz commented Mar 7, 2023

@marcoaccame and I tested successfully both the intermediate v1.1.10 and the definitive v1.2.10 FWs on the wrist-setup.
Now we have to acquire some quantities to catch the differences between the old v1.0.9 and the new v1.2.10.

cc @Nicogene @pattacini @mfussi66

@marcoaccame marcoaccame marked this pull request as ready for review March 31, 2023 07:27
@marcoaccame marcoaccame merged commit af7c9dd into robotology:devel Mar 31, 2023
valegagge pushed a commit to valegagge/icub-firmware that referenced this pull request May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants