instruction exception of S32R274

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

instruction exception of S32R274

Jump to solution
3,383 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
Reply
1 Solution
3,367 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
3,368 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Please have a look at reference manual:

petervlna_0-1618903891295.png

best regards,

Peter

 

3,354 Views
Durant-Harden-Irving
Contributor III

Get it,thanks very much!

MF
0 Kudos
Reply