MC9S12XDP512- Change the mode from normal to normal expanded using MODE register

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

MC9S12XDP512- Change the mode from normal to normal expanded using MODE register

1,310 Views
sathish_K
Contributor I
Hi,
  
    I'm trying to change Normal mode to Normal expanded mode using MODE register. But when I writing 0xA0(normal expanded mode) into MODE register the Microcontroller is not working.

How to change the mode from normal to normal expanded mode?
Is any sequence to follow?

please help...

Thanks,
Sathish.K
Labels (1)
0 Kudos
1 Reply

280 Views
DPB
NXP Employee
NXP Employee
Hello

The MODE register cannot be written if the device is secured. So firstly ensure that the device is unsecured.

Independent of security, In normal single chip mode the MODE register is a "write once"  register. This means that after each reset it can only be written to once and thereafter writes have no effect. So one possibility is that a write access has already occurred before the attempted write of 0xA0. So try applying the 0xA0 write to MODE soon after reset. If XGATE is being used, you could also check that the XGATE is not unexpectedly writing to MODE.

To ensure that internal flash is still in the memory map after the mode change the ROMON bit in the MMCCTL1 register must be set. If this is clear, then on switching to Normal Expanded Mode, the internal flash is removed from the memory map, so running code from internal flash no longer works. ROMON can be set by software or can be initialised at reset using the ROMCTL pin signal  (PK7).

Submit Post
DPB
0 Kudos