How to set program counter to illegal address while code is running ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I'm trying to create illegal instruction reset.

I'm programming Infineon TC29x Aurix Tricore Microcontroller based embedded system in 'C' language.

I need to set program counter to illegal address, i.e. 0x00FF FFFC. Can this be done with assembly language instructions?
If yes, please instrument assembly language instruction that would set program counter to 0x00FF FFFC while code is running.
0 Likes
1 Reply
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored
You can place this code snippet:

void (*foo)(void) = (void*)(0x00FFFFFC);
foo();
0 Likes