Ways to Soft reset S12ZVC controller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ways to Soft reset S12ZVC controller

1,522 Views
kiranbhat
Contributor III

Hi

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

Labels (1)
4 Replies

896 Views
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!
-----------------------------------------------------------------------------------------------------------------------

896 Views
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 Kudos

896 Views
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 Kudos

896 Views
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 Kudos