MC9S08LG32 Vector remapping

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

MC9S08LG32 Vector remapping

623 Views
sachinpawar
Contributor I

Hello all, i need to achieve vector remapping which can be enabled or disabled from user code.

i.e. Step1. BDM program the Bootloader code to MCU.

     Step 2. Bootloader programs the User Code.

     Step 3. vector redirection ON

     Step 4. Execute user application.

 

I tested the remapping using following method:

1. Erase the Mcu using target tasks of Code Warrior.

2. program the bootloader with "const byte NVOPT_INIT @0x0000FFBF = 0x02;" in its global section.

3. program the user application.

4. protect any block of flash usng Target tasks of Code Warrior

 

After doing this and restarting the MCU give a redirected vector successfully done.

Now what i want is i can enable and disable the mapping from user code and that too not by using Target Task feature of Code warrior. It should be in a way that when jumping from bootloader to application the mapping is enabled and when jumping back to bootloader or say given a reset then the remapping disables.

Labels (1)
0 Kudos
Reply
2 Replies

484 Views
david_diaz
NXP Employee
NXP Employee

Hello,

I think the following document could be useful for you:

Developer’s Serial Bootloader - AN2295

This application note is for embedded-software developers interested in alternative reprogramming tools.

I hope this material will be useful for you.

Have a great day.

David

0 Kudos
Reply

484 Views
sachinpawar
Contributor I

i have already been trough the note. My question is specifically about how to enable or disable mapping on the run i.e. accessing either FPROT or FOPT registers from user space

0 Kudos
Reply