MC9S12ZVML128_LIN_BLDC_Sensorless Code Not Working in Standalone mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MC9S12ZVML128_LIN_BLDC_Sensorless Code Not Working in Standalone mode

745 次查看
itsnewforme
Contributor IV

Hii, I'm using the code MC9S12ZVML128_LIN_BLDC_Sensorless. I'm using MC9S12ZVML128 as Lin slave node and CANoe as Lin Master node.

I've not made any changes to the code. I'm using the code as it is.

I'm attaching the code as well as the application note provided by the code here.

Here are my observations.:

1. After flashing the code and running the code in debugg mode I'm able to control the speed of the motor using CANoe. PFA

itsnewforme_0-1663928388098.png

itsnewforme_1-1663928407766.png

 

2) But, after flashing the code, removing the debugger and resetting the MCU, I'm not able to control the speed of the motor using CANoe. PFA 

itsnewforme_2-1663928632521.png

 

3) I found a nxp post regarding the same issue. I'm attaching the link here Link to Post . Here you suggested to check for the write only once register. 

4) In code I found out that the MODRR0_SCI1RR register is written twice first in initGPIO() and then in Init_PIM(). PFA

itsnewforme_3-1663929111291.pngitsnewforme_4-1663929189406.png

5) But, If I comment any one of the function Init_PIM() or InitGPIO(). I'm still facing the same issue. 

Kindly please check the code and application note once,

please let me know how to resolve this issue

Thanks in advance

标记 (2)
0 项奖励
回复
1 回复

715 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @itsnewforme,

 

Both writes are identical, so the second write can be ignored.

 

Do you power cycle the MCU?

If so, can you attach the debugger back (without reset) and halt the execution to see where the code got stuck?

Can you read the GDU registers?

Is there a fault flag set?

 

Thank you,

BR, Daniel

0 项奖励
回复