urgent !How to reset by Illegal address reset

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

urgent !How to reset by Illegal address reset

Jump to solution
958 Views
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

Labels (1)
0 Kudos
1 Solution
767 Views
kef2
Senior Contributor IV

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

View solution in original post

4 Replies
768 Views
kef2
Senior Contributor IV

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

767 Views
jason_zhang
Contributor III

Hi Edward

I am sorry  for  the wrong community.

Thank you for your help.

Jason

0 Kudos
767 Views
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 Kudos
767 Views
kef2
Senior Contributor IV

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 Kudos