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
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
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
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
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