S12Z Reset only to Normal Chip Mode

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

S12Z Reset only to Normal Chip Mode

跳至解决方案
1,084 次查看
manishsangram
Contributor IV

As per the MC9S12ZVM Family Reference Manual Rev 2.15

Mode Select Bit — This bit determines the current operating mode of the MCU. Its reset value is captured from the MODC pin at the rising edge of the RESET pin.

I am a bit confused and am seeking clarification here

1. In CodeWarrior when I change the "Boot Operating Mode" where is the change made in code or configuration? I assume it has to be made in the debugger profile, but I can't find it.

 

2. If the device is secure and the Boot Mode was set to "Normal" when code was flashed. Will subsequently reset with different MODC pin value allow switching to Special mode and allow debug access?

 

标记 (2)
0 项奖励
回复
1 解答
1,066 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

1) CodeWarrior considers you are using debugger so the multilink automatically ties the MODC pin to 0. You can also see that MODC pin has internal pull-up device connected during reset. Also, there is normal in the HW design to have MODC pin connected to the 3.3k or 4.7k pull-up resistor.

Any reset which is not initiated by debug interface for load/debug purposes is then started in the normal mode. For example power on, reset button pressing, …

Of course, if the device is secured the MCU goes into the special mode when debugger tries to connect but the only mass erase command is available.

2) As I wrote above. Normal mode is selected by MODC pin value during reset. If you reset the MCU to a special mode secured MCU is not accessible and the only mass erase command is available

 

Note, standard problem of understanding normal and special mode is when some registers are write once or not accessible in normal mode and accessible or rewritable anytime in special mode.

Debug mode (special mode) enables you to perform you some action which are not allowed in normal mode.

Best regards,

Ladislav

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,042 次查看
manishsangram
Contributor IV

I understand your explanation, but then what is the purpose of this setting

manishsangram_0-1741861249384.png

 

And operating mode switching means what?

0 项奖励
回复
1,067 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

1) CodeWarrior considers you are using debugger so the multilink automatically ties the MODC pin to 0. You can also see that MODC pin has internal pull-up device connected during reset. Also, there is normal in the HW design to have MODC pin connected to the 3.3k or 4.7k pull-up resistor.

Any reset which is not initiated by debug interface for load/debug purposes is then started in the normal mode. For example power on, reset button pressing, …

Of course, if the device is secured the MCU goes into the special mode when debugger tries to connect but the only mass erase command is available.

2) As I wrote above. Normal mode is selected by MODC pin value during reset. If you reset the MCU to a special mode secured MCU is not accessible and the only mass erase command is available

 

Note, standard problem of understanding normal and special mode is when some registers are write once or not accessible in normal mode and accessible or rewritable anytime in special mode.

Debug mode (special mode) enables you to perform you some action which are not allowed in normal mode.

Best regards,

Ladislav

0 项奖励
回复