Illegal address on MC9S08AW

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Illegal address on MC9S08AW

2,639 次查看
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 回复数

600 次查看
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 项奖励
回复

600 次查看
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 项奖励
回复

600 次查看
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 项奖励
回复

600 次查看
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 项奖励
回复

600 次查看
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 项奖励
回复