Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The HCS08 supports vector redirection, but not multiple vector tables (<em>see the quote at the end of my answer</em>). <a href="http://208.74.204.137/t5/8-Bit-Microcontrollers/S08-Vector-Redirection-a-suggestion-for-improvement-GZ60-AZ60/td-p/26467" rel="nofollow">This thread</a> provides an interesting discussion. From what I read, there is no straight-forward way to use multiple vector tables in FLASH on the HCS08. This leaves you with only a few options:</p> <ol> <li>A RAM vector table</li> <li>No interrupts in your bootloader</li> <li>Relocate vectors to unprotected flash and have both the boot and app use that table</li> </ol> <h2>RAM Vector Table</h2> <p>You could force interrupt vectors to look up their address in RAM. To do this, you would use the primary vector table location. Each vector would be set to a function which jumped to a RAM address. The RAM address would be the location of your interrupt code. </p> <p>With this strategy, your application and bootloader code could specify different interrupt functions. It could be risky to use RAM for your vectors.</p> <h2>No Interrupts in the Bootloader</h2> <p>Another option would be to implement your bootloader without interrupts. You could then protect the bootloader memory, redirect the vector location and have your application program the vector table.</p> <h2>Relocate vectors to unprotected flash</h2> <p>See <a href="http://www.freescale.com/files/microcontrollers/doc/app_note/AN2140.pdf" rel="nofollow">AN2140</a> for a discussion on this technique.</p> <p>The following comes from the <a href="http://cache.freescale.com/files/microcontrollers/doc/data_sheet/MC9S08EL32.pdf?fpsp=1" rel="nofollow">datasheet for the MC9S08EL/SL</a>:</p> <blockquote> <p>4.5.8 Vector Redirection</p> <p>Whenever any FLASH is block protected, the reset and interrupt vectors will be protected. Vector redirection allows users to modify interrupt vector information without unprotecting bootloader and reset vector space. Vector redirection is enabled by programming the FNORED bit in the NVOPT register located at address 0xFFBF to 0. For redirection to occur, at least some portion of the FLASH memory must be block protected by programming the NVPROT register located at address 0xFFBD. All interrupt vectors (memory locations 0xFFC0–0xFFFD) are redirected, though the reset vector (0xFFFE:0xFFFF) is not.</p> <p>For example, if 1024 bytes of FLASH are protected, the protected address region is from 0xFC00 through 0xFFFF. The interrupt vectors (0xFFC0–0xFFFD) are redirected to the locations 0xFBC0–0xFBFD. If vector redirection is enabled and an interrupt occurs, the values in the locations 0xFBE0:0xFBE1 are used for the vector instead of the values in the locations 0xFFE0:0xFFE1. This allows the user to reprogram the unprotected portion of the FLASH with new program code including new interrupt vector values while leaving the protected area, which includes the default vector locations, unchanged.</p> </blockquote> <p>See also this <a href="http://www.freescale.com/files/microcontrollers/doc/app_note/AN2295.pdf" rel="nofollow">application note (AN2295)</a> about implementing a serial bootloader for this family of micros.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload