Skip to main content
ASiqu.1
Visitor II
June 25, 2020
Solved

Using a BOOSTXL-DRV8323RS with a NUCLEO-F303RE+MCWorkbench

  • June 25, 2020
  • 4 replies
  • 2642 views

I have been trying to drive a 24V motor with sensorless FOC by using a NUCLEO-F303RE (as the MCU) and the BOOSTXL-DRV8323RS (as the gate driver with MOSFETs on board). For doing that, I'm trying to use ST's MC Workbench to generate code for the NUCLEO.

I have tried many different parameters on the Workbench, specially for the start-up parameters, however, after programming the NUCLEO with the generated code, I'm always getting a Undervoltage Fault when I click on "Start Motor" and the motor just gives me a quick small rotation. What happens is that the motor draws a huge current which is then limited by the power supply which lowers its voltage (to maintain the current lower than the limit). The current limit is at around 5-10A which should be enough. I have tried increase the limit, and although the motor rotated more than usual, it quickly started to smell like burning.

Additionally, I'm using all the default values of the DRV8323RS registers.

I have attached some parameters of my MC Workbench. And the project file.

Please let me know any supportive information I can get you to help solve this problem!

Update: Solved! The driver uses an inverting gain, but I was setting a non-inverting gain on ST Workbench.

This topic has been closed for replies.
Best answer by Laurent Ca...

Dear @ASiqu.1​ 

Sorry, I missed your edit "Update: Solved! The driver uses an inverting gain, but I was setting a non-inverting gain on ST Workbench.".

Glad you were able to solve your problem.

Best regards

Laurent Ca...

4 replies

Laurent Ca...
Senior III
September 14, 2020

Dear ASiqu.1

Do you have still this problem to solve?

Best regards

Laurent Ca...

Laurent Ca...
Laurent Ca...Best answer
Senior III
October 14, 2020

Dear @ASiqu.1​ 

Sorry, I missed your edit "Update: Solved! The driver uses an inverting gain, but I was setting a non-inverting gain on ST Workbench.".

Glad you were able to solve your problem.

Best regards

Laurent Ca...

MMoha.10
Associate III
May 23, 2023

Hi @ASiqu.1​,

Hope you are doing well.

I'm coincidentally working on the same board (BoostXL-DRV8323) and running into similar issues. Where did you happen to see non-inverting/inverting gain setting?

I was trying the 3 PWM mode with 3 enable pins from the Workbench. I can see that ST is sending out the correct PWMs on the oscilloscope. However, the DRV8323 doesn't relay it to the MOSTFETs. But, if I try disconnecting one of the enable pins, the DRV8323 suddenly springs to life and gives out PWM to the motor. Not sure if there's any additional enable settings I need to do. (I do have the ENABLE pin high). Any insight would be very helpful.

Thank you.

Visitor II
November 10, 2023

Can you give some more details on this solution? I tried making my gain -20 in the board manager profile for my boost-drv8323. I end up with an error in the drive settings. The P and I gains for the Torque current regulator end up negative. I'm not 100% sure what to do about that.

 

For anyone stuck on this in the future. Set the gain positive in the Board Manager DRV description. In the generated code you need to find the file that corresponds to your current measurement choice. For me it was r3_1_f4xx_pwm_curr_fdbk.c. There were three places where you need to change the sign on the measured current. Look for the functions : 

R3_1_GetPhaseCurrents
R3_1_GetPhaseCurrents_OVM
R3_1_RLGetPhaseCurrents
Each one of these functions takes as input, an ab_t* pointer. At the end of these functions, change the sign of the a and b component of the ab_t variable.
 
For example I updated the end of R3_1_GetPhaseCurrents to something like : 
  pStator_Currents->a *= -1;
  pStator_Currents->b *= -1;
  pHandle->_Super.Ia = pStator_Currents->a;
  pHandle->_Super.Ib = pStator_Currents->b;
  pHandle->_Super.Ic = -pStator_Currents->a - pStator_Currents->b;
 
I just got through motor profiling with the DRV8323RS once I did this update. Everything seems to be working correctly right now.