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.png
itsnewforme_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