BLDC motor control

I am R&D a project based on S32K_BLDC_Sensorless platform and the software platform is "MTRDEVKSBNK144_S32DS".

I have a question now:

When my application starts running a motor, It always run in "stall" status. I found that the condition to enter stall status is : timer FTM2 overflow. It means if there is no any hall sensor signal changes within FTM2 timer, the app will enter stall status.

FTM2 timer period is fixed(longest period), my application want to more time to enter stall status. So how to make it?

Sorry for the late response on this issue. Are you using the FreeMaster GUI interface? If so, please verify that you have connected the 12 V power supply to the power supply terminals on DEVKITMOTORGD board before connecting the USB in the S32K EVB board.

If you connect first the USB to the board, the software will start and it will detect an error in the sensor. Also, In case of pending faults, click the Clear FAULT on the FreeMASTER MCAT Control Page, or alternatively press and hold SW2 and SW3 buttons on S32K144EVB board simultaneously, This will reset the board to the initial state and start the program with all the connections correctly detected.

My project is working well. It's also well connecting with freeMaster tools and with demo board.

My question is about the source code design of MTRDEVKSBNK144 about BLDC control.

When my application starts running a motor, It always run in "stall" status. I found that the condition to enter stall status is : timer FTM2 overflow. It means if there is no any hall sensor signal changes within FTM2 timer, the app will enter stall status.

FTM2 timer period is fixed(longest period), my application want to more time to enter stall status. So how to make it?

MTRDEVKSBNK144 is a sensorless demo, If you want a demo based on the sensor hall I would recommend modifying this demo, you can check the MTRDEVKSPNK144 demo, this is a sensor motor control demo and you will have a different project (using sensor) and a different project of FreeMASTER.

Sorry for the misunderstanding, you are correct, the MTRDEVKSBNK144 is the one that includes the Sensor based example. You need to change the Macro definition #define HALL_SENSOR to "1". I have tried compiled and download the code with this define, and everything works correctly, I don't fall in a stalled status if I connect first the power supply and then the USB cable.

3. The motor should be run success even with load to start.

If the motor has a great load in the rotor, it should not be able to measure the start position and it will give a Stall error.