2021-11-02 09:03 PM
(Environment)
(Test Result)
All MCU pin configuration and motor control parameters are the same except for MCU specific ones.
(Detail Observation)
When motor startup (with F446RE) , it looks current control is not working.
During the initial alignment (about 1 second):
Solved! Go to Solution.
2021-11-23 01:28 AM
Hello @THA.1 ,
As promised, I worked on your setup. I attached here a compressed version of the stmcx file I used.
Important point, I had to do an hardware modification to be able to spin the motor.
The issue comes from the fact that IHM16 connect the current of phase V to 2 pins C10_18 and C10_24.
C10_24 is the one connected to PB1 where an ADC channel is available, that is Ok. But C10_18 is not connected to PB11 that does not exist on F446, but to VCAP_1 which is connected to the ground through a capacitor. Say it differently C10_18 connects the ADC input used to read the current of phase V to the ground, this is the reason why you were not able to spin your motor. There are two different ways to fix the issue, you can unsolder the resistor R41 on the IHM16, or cut the pin C10_18 on the F446 Nucleo connector.
(I think the second option is safer - I guess you do not need to have VCAP pin presents at morpho connector).
Hope it helps.
Cedric
2021-11-03 01:30 AM
Hello @THA.1 and welcome to the ST Community.
Since your question is about STM32 MCSDK, I moved your thread from the topic Motor Control Hardware to "STM32 Motor Control".
2021-11-03 04:06 AM
Thanks.
I tried it with MCSDK 5.4.7 and MCSDK 5.Y.3 in order to double check MCSDK 5.Y.2 defect, but I got the same result - not working, startup failure with F446RE.
Since NUCLEO-L476RG has the same pin configuration and working well, I don't think it's hardware problem such as incompatibility with the power board.
I strongly suspect MC Workbench because it does not automatically assign F446RE MCU pins compatible with X-NUCLEO-IHM16M1 (PWM out, current feedback input, DC voltage input, etc) as do for L476RG and G431RB (why difference?).
2021-11-03 11:15 PM
[Update]
I tried it by adding NUCLEO MCU boards to MC Workbench as custom board, that is, all MCU configuration should be done manually.
(Result)
NUCLEO-L476RG as custom board + X-NUCLEO-IHM16M1 + GBM2804H-100T(BLDC sensorless) => working well
NUCLEO-F446RE as custom board + the same board & motor & configuration => motor startup fail ! (no change)
In both case, debugger interface should be enabled at CubeMX then generated the whole project code.
Any suspected thing or test idea is welcome !
2021-11-05 04:15 AM
Hi, I updated my question with more specific test results. Could you kindly review it or send them to an expert in ST Motor Control?
2021-11-08 12:08 AM
[Update]
I tried the same test by replacing the power board with X-NUCLEO-IHM07M1 (BLDC motor was replaced as well).
(Result)
NUCLEO-L476RG + X-NUCLEO-IHM07M1 + Bull Running BR2804-1700kv(BLDC sensorless) => working well
NUCLEO-F446RE + the same board & motor & configuration => working well
In this case, MC Workbench also automatically assign F446RE MCU pin configuration to be compatible with X-NUCLEO-IHM07M1 as below (It didn't do for X-NUCLEO-IHM16M1).
According to which power board to be integrated, MC Workbench code generation work differently (Why?)
MC workbench database might not have (F446RE + X-NUCLEO-IHM16M1) combination, then code is incorrectly generated?
2021-11-12 07:40 AM
Hello @THA.1 ,
Thanks for reporting the issue.
>According to which power board to be integrated, MC Workbench code generation work differently (Why?)
>MC workbench database might not have (F446RE + X-NUCLEO-IHM16M1) combination, then code is incorrectly generated?
The IHM16 has a different usage of the morpho connector than the IHM07. When we started the development of the WB several years ago, this use case was not anticipated.
In the coming version 6 of the Workbench, we developed a software algorithm to fix all the connection issues. The power board will be described from the features to the connector, and the control board from the connector to the MCU pins. The algorithm will be in charge of connecting the power board features up to the MCU pins. The user will have the possibility to select one of the configuration proposed by the Workbench with the guarantee that it will work out of the box.
Unfortunately, for the time being, the IHM16 + F446 pinning assignment must be manually modified to have a working project.
If you need a F446+IHM16, I can work on it and post you a working stmcx file next week.
Regards
Cedric
2021-11-16 08:05 PM
Thank you !!!
Yes, I need F446+IHM16. If you let me know what the problem is and which pinning assignment should be modified manually, it would be great so that I could understand the problem and apply it when I use other NUCLEO board or power board.
If you also send a working stmcx file for F446+IHM16, I would like to compare it with the modified stmcx file by myself.
2021-11-23 01:28 AM
Hello @THA.1 ,
As promised, I worked on your setup. I attached here a compressed version of the stmcx file I used.
Important point, I had to do an hardware modification to be able to spin the motor.
The issue comes from the fact that IHM16 connect the current of phase V to 2 pins C10_18 and C10_24.
C10_24 is the one connected to PB1 where an ADC channel is available, that is Ok. But C10_18 is not connected to PB11 that does not exist on F446, but to VCAP_1 which is connected to the ground through a capacitor. Say it differently C10_18 connects the ADC input used to read the current of phase V to the ground, this is the reason why you were not able to spin your motor. There are two different ways to fix the issue, you can unsolder the resistor R41 on the IHM16, or cut the pin C10_18 on the F446 Nucleo connector.
(I think the second option is safer - I guess you do not need to have VCAP pin presents at morpho connector).
Hope it helps.
Cedric
2021-11-23 11:51 PM
This is great !
I cut the pin C10_18 on NUCLEO-F446RE, then all is working well :)
I didn't notice the difference of VCAP pin.
(Question 1)
In your stmcx file, BKIN is assigned to mcu pin A6. It is not, however, connected on IHM16M1 board. PB12 should be used for F446RE?
(Question 2)
I'm developing a customized BLDC drive based on F446RE, where all pin assignment and configuration will be done manually at MC Workbench, CubeMX.
Is there any notes I should pay attention to or configuration to be careful of, or a useful list I should check especially in order to prevent fatal errors?
MC Workbench and CubeMX gives a lot of flexibility but I'm not sure my configuration such as NVIC, timer, clock, etc is optimal or free from potential defects.
Best regards,
THA