Where to map a trap vector table used by a Tricore?

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

cross mob
User17740
Level 4
Level 4
First solution authored First like received
Hi again,

do you know where to map a trap vector table used by a Tricore ?

Thanks!
Bernie


#8042000 13136
0 Likes
1 Reply
User18237
Level 5
Level 5
First solution authored First like received
Hi Bernie,


The trap vector table consists of a table of 8 successive vectors. Each vector contains 32 bytes.

Address of the table vector table used by the core shall be set in its register BTV.

When a trap is triggered, to select the Trap Vector to execute, a OR operation is performed between address configured in BTV and the Trap class to trigger left-shifted by 5 bits:

Example: when a trap with class 3 is triggered, then the address of the trap vector to execute is: (BTV + (3 << 5) ).

-> This means the address of vector table shall be aligned according: the 5 lsb of its address shall be '0'.

Per default, after a reset, address configured in BTV register of the core is 0xA0000100.

This means that in all applications where an reaction is wanted before BTV is set, there shall be a vector table mapped at this default address to manage any trap which could be triggered before configuring BTV register.

For instance, this could be the address used for vector table of the bootloader application.


Best regards
Mr. AURIX™
0 Likes