Illegal address on MC9S08AW

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Illegal address on MC9S08AW

2,803件の閲覧回数
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
ラベル(1)
0 件の賞賛
返信
5 返答(返信)

764件の閲覧回数
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 件の賞賛
返信

764件の閲覧回数
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 件の賞賛
返信

764件の閲覧回数
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 件の賞賛
返信

764件の閲覧回数
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 件の賞賛
返信

764件の閲覧回数
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 件の賞賛
返信