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!
Solved! Go to Solution.
Hello,
Please have a look at reference manual:
best regards,
Peter
Get it,thanks very much!