Illegal address on MC9S08AW

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

Illegal address on MC9S08AW

2,485 Views
StevenB
Contributor I
I am using the MC9S08AW32 and am trying to port over a bootloader from the MC9S08QG. 
 
I was using an illegal address reset and illegal opcode reset to differentiate on whether I needed to enter bootloader mode or reset to the main program.
 
The problem I am having is that the illegal address reset doesn't seem to occur in the AW32 no matter what address I "jump" to .  Does the AW32 not have an illegal address area as the QG did? 
 
Thanks.
 
Steve
Labels (1)
0 Kudos
5 Replies

446 Views
StevenB
Contributor I
Thanks for the input.  I suspected that it must function like the AW60, which doesn't have an illegal area.
 
This causes my current bootloader to not work as written.  I was using the illegal opcode reset AND the illegal address reset to enter the bootloader.  This allowed me to differentiate between a reset that entered user code (if it existed) or went straight to bootloader code.
 
I'll most likely have to use the COP to force a non-ILOP interrupt.
 
Thanks.
 
Steve
0 Kudos

446 Views
Wings
Contributor I
Steve, you could place a unique value in ram somewhere prior to your illegal op-code. Examine the value when you come out of reset to determine which way to go, then zero it out. I'd use a 16 bit value (or even 24 or 32) to reduce the chance that random data on a power up would send me to the wrong place.
0 Kudos

446 Views
StevenB
Contributor I
Good suggestion.  I was wanting to avoid something like that due to wanting the user code to be independent of the bootloader as much as possible.  I currently have the COP taking the place of the ILAD reset, and it seems to work.
 
If I have any problems with that, I'll probably go with your "unique value in ram" idea.
 
Thanks.
 
Steve
0 Kudos

446 Views
bigmac
Specialist III
Hello Steve,
 
I suspect that the S08AW does not have illegal address reset - I cannot find it itemised in the data sheet.  This makes some sense since the AW60, from which the AW32 is derived, does not have any gaps in its memory map.
 
I would also suspect that the AW32 uses the same die as the AW60, but with a portion of the flash memory not guaranteed.
 
Regards,
Mac
 
0 Kudos

446 Views
eckhard
Contributor V
Hello,

seems that like on other freescale MCUs the AW32 uses the same DIE than the AW60. Maybe you should try to use the illegal opcode reset. That should work on all HCS08.

Eckhard
0 Kudos