AnsweredAssumed Answered

Upgrading S32 Design Studio for Power Architecture from V1.1 to V1.2 

Question asked by Ivan Juresa on Jul 7, 2017
Latest reply on Jul 10, 2017 by Ivan Juresa


We found some quite interesting problem regarding new S32 version. 

We were working on S32 V1.1 for quite some time now and today we have switched on V1.2. Hardware we are working on is MPC5744P and problem emerged on our STM (System Timer Module) driver.


Problem is when it tries to set PRESCALER value program jumps to IVOR1 machine check. Digging deeper we found that when writing PRESCALER value to STM_0.CR.B.CPS register it tries to write value as BYTE and not as WORD which is of course triggering error because as said in MPC5744P Reference Manual STM registers can only be accessed using 32-bit (word) accesses.

As seen on picture above S32 Design Studio V1.1 is used and it writes value as word.


On picture above v1.2 is used and it can be seen that on same line of code it tries to write value as BYTE which results in MachineCheck IVOR1.


Problem can be solved by OR-ing value as: STM_0.CR.R |= STM->prescaler - 1;

but it is not readable as above solution.

Why is only prescaler value being written as BYTE and the rest are written as WORDs?