Closed MaximilianKoestler closed 2 years ago
Hello, I would like to ask by the way, the new version I used has changed some parameters, but the motor does not run, and the calibration cannot be carried out. Did your transplanted program start running?
Did your transplanted program start running?
I am still preparing for the first tests, verifying as much as possible before even starting to adapt the new version of the firmware for my needs. I will post an update here if and when I get it working.
ok,Thanks
------------------ 原始邮件 ------------------ 发件人: "bgkatz/motorcontrol" @.>; 发送时间: 2022年7月14日(星期四) 晚上8:06 @.>; @.**@.>; 主题: Re: [bgkatz/motorcontrol] hw_config incompatible with old mbed code (Issue #8)
Did your transplanted program start running?
I am still preparing for the first tests, verifying as much as possible before even starting to adapt the new version of the firmware for my needs. I will post an update here if and when I get it working.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
The naming convention in the original firmware didn't match the solder mask labels on the PCB. The new firmware was corrected to match the PCB. Both work fine on the original hardware.
The naming convention in the original firmware didn't match the solder mask labels on the PCB. The new firmware was corrected to match the PCB. Both work fine on the original hardware.
Thank you for confirming again that porting the new firmware to the old boards is essentially safe and possible. I think this Issue can then be closed, I will go ahead with my plan.
Since I have now realized that the board I have to target is actually using DRV8323RH (so not the SPI variant), there are a few things I need to adapt in any case.
Hello, I would like to ask by the way, the new version I used has changed some parameters, but the motor does not run, and the calibration cannot be carried out. Did your transplanted program start running?
@Erick-Zhf After making the required adaptions tor my driver PCB (notably for the DRV8323RH), the calibration worked pretty much instantly. I needed to reduce KI_D
and KI_P
in the firmware a bit (and of cause update the number of pole pairs and the gear reduction ratio), otherwise most things just worked from the start.
I guess if you are still having trouble, that discussion should move to a new issue.
OK,I have almost the same problem as you, the calibration has always been a problem, I am now starting to debug the old version
------------------ 原始邮件 ------------------ 发件人: "bgkatz/motorcontrol" @.>; 发送时间: 2022年7月25日(星期一) 下午5:11 @.>; @.**@.>; 主题: Re: [bgkatz/motorcontrol] hw_config incompatible with old mbed code (Issue #8)
Hello, I would like to ask by the way, the new version I used has changed some parameters, but the motor does not run, and the calibration cannot be carried out. Did your transplanted program start running?
@Erick-Zhf After making the required adaptions tor my driver PCB (notably for the DRV8323RH), the calibration worked pretty much instantly. I needed to reduce KI_D and KI_P in the firmware a bit (and of cause update the number of pole pairs and the gear reduction ratio), otherwise most things just worked from the start.
I guess if you are still having trouble, that discussion should move to a new issue.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Hi,
I have started comparing the code in this repository with the old mbed code, specifically with this revision: https://os.mbed.com/users/benkatz/code/Hobbyking_Cheetah_Compact_DRV8323/
This is part of an effort to port an existing modified variant over the version in this repository.
Before testing anything, I have spotted several changes to the pinout of the STM32 that left me puzzled:
Different Timer Connections
This is how the timers are currently set up in
hw_config.h
:.ioc
, I get this mapping:TIM1_CH1
PA8
TIM1_CH2
PA9
TIM1_CH3
PA10
The
Config/hw_config.h
from the old mbed version defines this mapping:U
andW
:U
PA10
PA8
V
PA9
PA9
W
PA8
PA10
Different ADC Channel use
Similarly, the ADC channels have been swapped as far as I can tell.
This is how the ADC channels are currently set up in
hw_config.h
:.ioc
, I get this mapping:ADC1_IN10
PC0
ADC2_IN11
PC1
ADC3_IN0
PA0
The
hw_setup.cpp
from the old mbed version defines this mapping through register configuration:So far, so good, the name/pin mappings are identical. However, the code in
Calibration/calibration.cpp
shows an interpretation of the ADC channels that is different from the one in the new repository:1
I_C
I_A
2
I_B
I_B
3
V_BUS
V_BUS
Questions
hw_config.h
before attempting to run the firmware on a driver that worked with the old mbed firmware?Sorry for the long post btw, I wanted to properly show where in the code my confusion comes from ;-)