instruction exception of S32R274

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

instruction exception of S32R274

Jump to solution
2,525 Views
Durant-Harden-Irving
Contributor III

Hello,

I met a problem regarding the STM instruction:

1. Init STM,and compiled by GreenHills, and works well

STM_0.CR.B.CPS = 59; // 0x0: Divide system clock by 1; 0x1:Divide system clock by 2 ...

2. Then compiled the same code by S32DS(GUN), and exception ocur, pc jump to IVOR1_Handler.

The last instruction is below (befor jump to IVOR1_Handler):

STM_0.CR.B.CPS = 59; // 0x0: Divide system clock by 1; 0x1:Divide system clock by 2 ...

3. Compare the diferent, I found(The detail please refer to attachment file):

    1) GreenHills: 556C8000   e_stw

     2) S32DS-GUN: 9267 se_stb

4. The modify the code, as below, and compiled by S32DS-GUN, works well:

    STM_0.CR.R = 0x3202;

My question:

Why exception ocur under the GUN, what should I take care when write the register by bit struct visit?

THanks!

MF
0 Kudos
1 Solution
2,509 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Please have a look at reference manual:

petervlna_0-1618903891295.png

best regards,

Peter

 

View solution in original post

2 Replies
2,510 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Please have a look at reference manual:

petervlna_0-1618903891295.png

best regards,

Peter

 

2,496 Views
Durant-Harden-Irving
Contributor III

Get it,thanks very much!

MF
0 Kudos