I am using S12ZVML128 MCU.
I have implemented the sensorless motor control.
I am getting a double bit error (FERSTATT = 0x02) for below test scenario.
Test conditions are as below,
Test temperature: -33.5 degrees C (in the constant temperature chamber)
Supply voltage: 10V to 16V (changed depending on the setting)
10V power supply current: 10A to 25A (depending on the load)
Rpm: 300 to 600 rpm (changed by instruction)
Testing pattern is to turn the power supply on/off and repeat the motor rotation/stop.
It is observed that, after power on motor does not rotate even if valid rpm instruction is applied and GPIO pins are toggling after approx 5msec.
To find out the cause, I have connected the debugger as "connect" in debug configuration and checked the register values and observed that double bit error occurred.
The same is observed on two separate boards.
I have again downloaded the software on same board then motor rotation was ok.
In SW, I have implemented the machine exception routine and COP reset is implemented if exception occurred.
PFA sheet containing the MCU register window screenshots and the wavelog.
Please provide me the reason behind this cause.
Thanks in advance.
I have noticed that FCLKDIV = 0x00 in the excel file that you attached.
Please select FCLKDIV based on the BUSCLK in your application.
Table 20-8. FDIV values for various BUSCLK Frequencies.
Thank you for sharing your answer.
I understand. We have selected the FCLKDIV value based on bus clock frequency.
SInce we have checked these registers in "Connect" mode as a debg configuration mode, I think the FCLKDIV value reflected is out of reset value which is 0x00, or else there is a possiblity that the code does not reach that part where FCLKDIV is set according to the bus clock.
Can you please confirm the same.
I must have overlooked the "connect" mode.
Yes, the FCLKDIV is reset but so are all the other registers including FERSTAT.
So, the error was detected after the MCU was reset.
You would need to connect the debugger in Attach debug mode to get the state of the MCU.