Andrew Glossop

S08 Vector Redirection - a suggestion for improvement - GZ60/AZ60 MCUs

Discussion created by Andrew Glossop on Dec 17, 2007
Latest reply on Oct 29, 2012 by bob_walker

I'm a long-time HC05/HC08 user, but only recently am I starting to use HCS08 MCUs. Have been waiting for a while (too long) for the DZ family (we use CANbus, so other S08 aren't much use).

I was looking forward to some of the new/better features in the S08, such as BDM. But the vector redirection is a huge disappointment. From doing a search, it seems that others agree that vector redirection isn't all that exciting.

We have for several years used a CAN bootloader in the GZ60/AZ60 MCUs. We use a jump table, so that the application firmware runs only if the jump table isn't all FFFF. Vector redirection *could* have been great, but it isn't. So I'm having to stick with a jump table in the DZ60.

I suppose that some people will be OK with the S08 implementation of vector redirection. Not sure what for though. Currently you have to either go without interrupts in the bootloader, or use a jump table. For it to be really useful for any bootloader/monitor code in protected flash, you really need to have control over the redirection.

On reset, NVOPT is loaded to FOPT. So redirection can be done at reset by configuring NVOPT. But FOPT isn't writeable, so you can't change it at runtime. Possibly only allow for redirection to be turned on from protected flash, to prevent rogue application firmware from "stealing" control.

My suggested "fix": make FNORED in FOPT writeable at runtime, so that 1) a protected bootloader can pass control over to application firmware (turn ON the vector redirection), 2) application firmware can turn OFF redirection, which effectively passes control back to a bootloader/monitor.

This would allow redirection on reset, as currently implemented, for applications without a bootloader/monitor. But would improve the usefulness when you need interrupts in a bootloader (eg - for CAN), AND want to then be able to swap to application firmware, with it's own set of vectors.

My question to Freescale: will new/updated S08 MCUs "fix" this problem? is Freescale happy with how it's currently implemented?

My question to other S08 users: would you like to see Freescale improve this feature? yes? no? or don't care? or does anyone have a better way to achieve this?]


Added p/n to subject.

Message Edited by NLFSJ on 2007-12-17 07:53 AM