Hi everyone,I need a bootloader to upgrade application through can on MC9S08DZ60, I found some references on website, now I'm confused about the Vector Redirection, somebody says the bootloader and application use the same vector table which redirected to unprotected flash region. But I think they use individual vector table, bootloader uses the default one locate at 0xFFC0 to 0xFFFF, app uses the one redirected to 0xFDC0 to 0xFDFD(assume 512 Bytes of flash are protected ).
Who can tell me the right answer.
Best Regards!
Hi,
bootloader and application use the same vector table. Normally only the reset vector is not redirected.
after the vector redirection, other higher address(except reset vector address) are for bootloader code.
does this answer your questions?
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
thanks for your answers, means that in bootloader I can't use interrupt, is it right?
Best Regards!
HI,
Because Block protection protects the original interrupt vector table from being overwritten. bootloader user table is used for vector relocation. thus all the standard interrupt vectors are pointing to this table with JMP instructions.
in bootloader you can use interrupt, when interrupt occurs the vector is fetched from protected memory and directs execution to continues at the corresponding JMP instruction in the bootloader user table.
you can refer this document for bootloader programming, in this application, bootloader and application are combined in one project.
or you can also refer an2295,
http://cache.nxp.com/files/microcontrollers/doc/app_note/AN2295
http://cache.nxp.com/files/microcontrollers/doc/app_note/AN2295SW.zip
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------