cancel
Showing results for 
Search instead for 
Did you mean: 

B-G431B-ESC1 motor profiler not working (moderator note: this post contains now a bug-fix patch on provided example)

nik8540
Associate II

Hi,

I am trying to use motor profiler 5.4.4 with B-G431B-ESC1. Every time, Electric model reaches 30 percent quickly and then gradually reaches 38 percent to get the 'too much time' warning after which process fails.

I tried different BLDC motors (12 pair-400KV, 7 pair-1900kv)and also tried different supply voltage(12V, 16V, 25V). However result is same.

I can also see few other posts which mentions about similar issue, however, they have not been answered.

Any help to resolve this is much appreciated.

29 REPLIES 29
DBE
ST Employee

​Hello,

Could you please first check the revision of your G4 MCU, you can find it on the right side of the ST logo. If it is a Y revision then you need a firmware update that will be available soon. In any case it is better to help the profiler to converge by specifying the max. current in the Motor Profiler GUI, in some cases a low current helps a lot. For example this ESC board is able to profile the motor provided in the P-NUCLEO-IHM001 (which is 7 pair -1700KV)  if 1A or less is specified in the GUI. 

Best regards

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hi @DB.7ERGANTIN​ ,

Thanks for your reply.

I have G4 MCU with Y revision. Is there any estimated timeline for firmware update?

I quickly tried 7pair 1900kv motor with 1A setting. It did not work.

Is there any 6 step firmware or reference code available for this esc? Really looking forward to using it as I have 4 of them laying around unused.

Regards

Nikhil

EGran.2
Associate II

@nik8540​ 

Is it from batch B04 (labeled on the back)?

I've been told that these do not work, I just wrote a post about it!

Yes. These are from batch B04.

How did you get to know about this issue? Is there any more information available regarding this issue? problem with ST-Link for G4 board?

Regards

Nikhil

There's a bunch of people on another forum wondering why their B-G431B-ESC1 is not working.

Finally some of them managed to isolate the problem to the batch-no.

I've tried to find a solution to this for the last month, with no luck.

Let's just say, this mistake from ST has cost 100's of hours in frustration across the globe...

I hope they fix it soon!

JA.1
Associate III

I also have the Y version..

I just spend 2 weeks debugging why my setup is not working.. And guess what, I got the Y batch...

Thanks for clearing this out. Can you point me to the forum you've used?

DBE
ST Employee

Hello,

Please find attached an unofficial motor profiler firmware for G4 Y revision and tested on a Y revision with several motors including a 7 pair-1700KV. The official one should be released with the next MCSDK. Then Close your motor profiler GUI, go to C:\Program Files (x86)\STMicroelectronics\MC_SDK_5.4.4\Utilities\PC_Software\STMotorProfiler\resources\assets\fws directory (in general this where the MCSDK is installed) and replace your B-G431B-ESC1#B-G431B-ESC1 3Sh*.hex by the one attached.

Please find also a fix to add to your B-G431B-ESC1 (still for G4 Y revision), replace your r3_2_g4xx_pwm_curr_fdbk.c in <myPrj>\MCSDK_v5.4.4\MotorControl\MCSDK\MCLib\G4xx\Src by the one attached. Open your mc_tasks.c in <myPrj>\Src and look for FOC_CurrControllerM1 routine, then cut RCM_ReadOngoingConv(); and place it before RCM_ExecNextConv(); . These fixes should be also released in the next delivery.

Best regards

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.
JA.1
Associate III

Thanks for sharing the fix with us! I will try it in a few minutes.

I have a question though. The issue with the Y revision of the chips, what consequences does it have with respect to motor control? Is it ONLY with the Motor Profiler there is an issue, or in general with motor control? I am asking since I have now used more than 2 weeks to get my MC application up and running, but the setup is acting weird. Hopefully the explanation is "just" that the Y-revision chip is causing this.

Edit: I didn't read the last part of your message. Sorry, will try out that fix first. =)

Edit2: I just tried the fix (motor profiler) and it successfully profiled my motor. Peww, finally! Thanks.

@EGran.2​ Maybe you can share the other forum with me?

DBE
ST Employee

​Hello,

There is an hardware issue on G4 ADC Y revision which needs a workaround, please refer to ES0431 documentation chapter 2.5

https://www.st.com/resource/en/errata_sheet/dm00502298-stm32g431xx441xx-device-errata-stmicroelectronics.pdf

best regards 

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.