Bootloader timer interrupt

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

Bootloader timer interrupt

1,452 Views
pratibhasurabhi
Contributor V

Hello,

I am using s12zvml64 series mcu with code warrior 10.7

I am creating a bootloader project , my project contains both user application and bootloader.

As with current scenario interrupt is getting hit in application code area and from there i am calling an ISR function to be executed that is defined in bootloader area so while hitting the interrupt the code is not going to the ISR functionality , as interrupt vector is defined in application code area and when the code is coming to bootloader area it is clearing the application code area.

So what can we do to access the timer interrupt in bootloader.

I am looking forward to the reply,

Thanks.

0 Kudos
Reply
3 Replies

1,399 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

The approach you do is really not recommended. A bootloader and the application should be created as two absolutely independent applications to ensure all possible overlapping problems and to avoid any possible incorrect addressing, jump or return.

To know something about good approach I suggest to read

https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Simple-Serial-Bootloader-for-S12Z-AN-draft/...

 

Best regards,

Ladislav

0 Kudos
Reply

1,395 Views
pratibhasurabhi
Contributor V

Hi,

Thanks for the reply.

As given in the link only we are going to create project ,

need some answer to the below queries :

1) For Bootloader project we need timer interrupt to be implemented and user application also uses many  type of interrupt can we merge these projects.

2) For Bootloader we require to implement a separate timer interrupt how it can be done can you please share some sample code for the same.

0 Kudos
Reply

1,371 Views
kef2
Senior Contributor V

Hi

2) S12Z are equipped with IVBR register, which allows both, bootloader and application to have their own interrupt vector tables and their own ISRs. 

 

1) You can't easily merge application with bootloader in the same project. It is possible but error prone. It is easier to include compiled bootloader code in application project, so that you can easily build production image of app+bootloader or debug with both app and bootloader programmed to flash memory.

 

Edward

0 Kudos
Reply