Ways to Soft reset S12ZVC controller

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

Ways to Soft reset S12ZVC controller

2,392 次查看
kiranbhat
Contributor III

Hi

Is there any assembly instruction to reset the controller through code???? if yes any sample code can be available.

标签 (1)
4 回复数

1,766 次查看
RadekS
NXP Employee
NXP Employee

Hi kiran,

Simplest way is using COP watchdog.

  1. Initialize COP watchdog by write into CPMUCOP register. For example: CPMUCOP=0x01;
  2. Trigger MCU reset by write into CPMUCRMCOP register (any value other than 0x55 or 0xAA). For example:  CPMUCRMCOP=0x00;

Note: bits in CPMUCOP could be written just once in Normal mode. Please ensure that your code do not initialize CPMUCOP register by write zeros prior requested initialization (step 1) - Writing CR[2:0] to “000” has no effect, but counts for the “write once” condition.


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,766 次查看
niba
Contributor III

The COP reset is not a soft reset, but a hard reset! For soft reset jump to application start:

asm jmp _Startup;

0 项奖励
回复

1,766 次查看
kiranbhat
Contributor III

What is that normal mode and special mode in COP. is it w.r.t COP or MCU modes. How to configure special mode.

0 项奖励
回复

1,766 次查看
RadekS
NXP Employee
NXP Employee

Hi kiran,

The BKGD/MODC signal is used as a MCU operating mode select during reset. The state of this signal is latched to the MODC bit at the rising edge of RESET.

If BKGD signal is high during reset, MCU will start in Normal single chip mode – CPU will start execute user code.

If BKGD signal is low during reset, MCU will start in Special single chip mode – CPU waits for BDM commands.

Please see chapter 1.10.1 Chip Configuration Modes in RM for more details.

For simplicity, special mode is used for debugging, normal mode for run code without debugger.


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复