BLDC_SCALAR_XMC1302 motor running Fixed Pattern

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Bond_007
Level 3
Level 3
10 questions asked 25 sign-ins 10 replies posted

Hello Team,

We are working to run the BLDC motor. For that we need to do hall learning procedure after that we will get six patterns used to run the BLDC motor. We are doing this using Infineon Example code "BLDC_SCALAR_HALL_XMC13_Power_Tool" and the patterns read from hall sensors after hall learning procedure as below 
0x201
0x021
0x120
0x102
0x012
0x210

Here we are facing issue which motor is not running after updating six patterns in the code.
It is running only for fixed pattern if we update as below 

#define MOTOR0_BLDC_SCALAR_CCU8_PH_U_SLICE_NUM  (1U)
#define MOTOR0_BLDC_SCALAR_CCU8_PH_V_SLICE_NUM   (2U)
#define MOTOR0_BLDC_SCALAR_CCU8_PH_W_SLICE_NUM  (0U)

Is that issue related to Software ?

image (6).png

 

 

Can anyone help me to solve this issue ?

 

Thank you,
Vamshi.b

0 Likes
1 Solution
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @Bond_007,

From your code we could see that after hall learning you have replaced the hexadecimal value instead of macro. Please try replacing the below code in power_tools_kit_DirectFET.h file.

#define MC_PAT_A WL_VOFF_UH /*!< Phase pattern corresponding to MOTOR0_BLDC_SCALAR_HALL_PAT_A */
#define MC_PAT_B WOFF_VL_UH /*!< Phase pattern corresponding to MOTOR0_BLDC_SCALAR_HALL_PAT_B */
#define MC_PAT_C WH_VL_UOFF /*!< Phase pattern corresponding to MOTOR0_BLDC_SCALAR_HALL_PAT_C */
#define MC_PAT_D WH_VOFF_UL /*!< Phase pattern corresponding to MOTOR0_BLDC_SCALAR_HALL_PAT_D */
#define MC_PAT_E WOFF_VH_UL /*!< Phase pattern corresponding to MOTOR0_BLDC_SCALAR_HALL_PAT_E */
#define MC_PAT_F WL_VH_UOFF /*!< Phase pattern corresponding to MOTOR0_BLDC_SCALAR_HALL_PAT_F */

 

Could you please capture the hall sensor output with respect to the back-emf of the motor to determine if there is any hall angle offset. Please capture the hall sensor output using the CRO to compare if the hall learning is same as the waveform captured in CRO.

 

Ques: Please tell me the reason to cause WHES bit set. why wrong hall is detecting. Am I missing anything ?

WHES will be enabled if the received hall output is not same as the expected hall pattern this will cause WHES 

For how WHES and CHES bit  is being set please refer to APPNOTE AP32289

 

Thanks,

Krupashankar

View solution in original post

0 Likes
9 Replies