2025-07-30 1:00 AM - edited 2025-07-30 1:50 AM
Hello and good day. I am doing a project of running a motor using 6-Step with Hall Sensor.
I am facing an Overcurrent issue while using Motor Pilot V6.4 in 6-Step + Hall Sensor mode. In MC Workbench, the current limit is set to 15A but the Nominal Current is shown as 2.16A in the Motor Pilot GUI. No matter what I do in MC Workbench, the Nominal Current doesn't change and always shows as 2.16A. Consequently, I can't start the motor as it there is always Over Current fault as the motor needs more than 2.16 to start.
I know that it's not a limitation of my Power Board as it is rated at 20A.
In MC Workbench, it's clearly stated 15 Apk is set and is within specification of Power Board.
The strange this is, when I try FOC + Hall Sensor mode, this doesn't happen and the Motor Pilot GUI is showing the correct Nominal Current limit (15A) below. Somehow, this issue only happens in 6-Step + Hall Sensor mode.
May I know why this Nominal Current setting is different between FOC and 6-Step GUI?
Here are the details of the project:
Edit: Added more details
2025-07-30 8:24 AM
Hi fmariz, I suggest you first to check this post:
hall-sensor-not-working-on-6-4
From my point of view, the problem you raised is only a display issue.
The firmware does not retrieve the current information from the MCSDK Workbench, and it is not displayed on the Motor Pilot (the default value of 2.16 A is shown).
Best regards.
Fabrice
2025-07-30 11:56 PM
Thanks for the reply @Fabrice LOUBEYRE
In that case, I am trying to think why my 6-Step design is causing the Over Current fault.
I have limited my power supply to just 5A peak and there's no Over Current option is unsupported anyway with my setup: 6-Step + Hall.
Do you know how to solve this issue? I have attached my MCSDK Workbench project for your reference.
2025-07-31 5:52 AM
Hi Fmariz, can you confirm that you have considered the modifications in your code regarding the "placement electrical angle" parameter.
To properly set the placement electrical angle parameter, update your code with the following:
1. The two defines into drive_parameters.h
#define STEP_SHIFT (HALL_PHASE_SHIFT / 60) /*!< Number of steps (60 degrees) into the Placement electrical angle. */
#define PHASE_SHIFT_DEG (HALL_PHASE_SHIFT - (STEP_SHIFT * 60)) /*!< Number of degrees remaining after STEP_SHIFT. */
2. The corresponding HALL_PHASE_SHIFT value of your HALL sensor into pmsm_motor_parameters.h
#define HALL_PHASE_SHIFT 238
3. Update the management of the STEP_SHIFT parameter at the end of the function HALL_TIMx_CC_IRQHandler embedded into the file hall_speed_pos_fdbk_sixstep.c
...
if (0U == pHandle->PhaseShift)
{
LL_TIM_DisableIT_CC2(pHandle->TIMx);
}
else
{
/* Set the remaining degrees after STEP_SHIFT set up into HALL_State2Step. */
/* Compute the counter value % to speed vs 60 degrees (step). */
uint32_t PhaseShiftTemp = ((pHandle->PhaseShift * hHighSpeedCapture) / 60U);
LL_TIM_OC_SetCompareCH2(pHandle->TIMx, PhaseShiftTemp);
LL_TIM_EnableIT_CC2(pHandle->TIMx);
}
You can also generate your project with the new MCSDK 6.4.1, which integrates the fix.
Best Regards.
Fabrice
2025-07-31 11:42 PM
Hi @Fabrice LOUBEYRE. Thanks for the suggestion. I'll let you know once I've tried it.
2025-08-05 4:52 AM
Hi @Fabrice LOUBEYRE. I have upgraded to MCSDK 6.4.1 and confirmed that the generated code matches the changes you suggested. However, I still get the same Over Current fault.
Do you have any other ideas that I can try?
2025-08-08 12:54 AM
@Fabrice LOUBEYRE I've found out that the fault is actually from the Driver Protection fault from STDRIVE101's nFault pin, and not Over Current fault as indicated. I've confirmed this by manually shorting the nFault Test Point to GND.
There's a bug with the Motor Pilot software.