urgent !How to reset by Illegal address reset

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

urgent !How to reset by Illegal address reset

跳至解决方案
1,856 次查看
jason_zhang
Contributor III

Hi

How to reset  mcu by Illegal address reset? Does the address is unique?

I can reset the mcu,but the ILAF is not correct!

 

I want to check the mcu whether reset by illegal address accesss by reading ILAF.

MCU type:9s12xeg128

Please give me a example?

 

Thank you very much!

 

Jason

标签 (1)
0 项奖励
回复
1 解答
1,665 次查看
kef2
Senior Contributor V

Wrong community, S12XE is 16bits.

You didn't mention operating mode. ILAF won't work in expanded modes. In single chip modes smth like this should do:

volatile char c;

  

   c = *(char* far)0xD0000; // unimplemented global address 0xD0000'G

Edward

在原帖中查看解决方案

4 回复数
1,666 次查看
kef2
Senior Contributor V

Wrong community, S12XE is 16bits.

You didn't mention operating mode. ILAF won't work in expanded modes. In single chip modes smth like this should do:

volatile char c;

  

   c = *(char* far)0xD0000; // unimplemented global address 0xD0000'G

Edward

1,665 次查看
jason_zhang
Contributor III

Hi Edward

I am sorry  for  the wrong community.

Thank you for your help.

Jason

0 项奖励
回复
1,665 次查看
tonyp
Senior Contributor II

I don't know about this specific MCU but in general, any illegal address (i.e., an address where code cannot possibly reside) is good enough.  So, if not sure, or your address map seems to be fully used, maybe JMP-ing to a port (e.g., PORTA) would trigger this.

0 项奖励
回复
1,665 次查看
kef2
Senior Contributor V

Bad guess, Tony. Illegal address on S12(X) is unimplemented address. PORTA is implemented and thus jump to it is perfecly legal. MPU (memory protection unit) can be used to prevent r/w/x access to specific location, but it has nothing to do with ILAF.

Regards,

Edward

0 项奖励
回复