EmbSys Register addresses are wrong after compilation

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

EmbSys Register addresses are wrong after compilation

758 次查看
kagoshi
Contributor I

Hello all!

I am running S32DS Power 2.1 version, on a MPC5744P Z4 devboard.
While using the FlexPWM, I have noticed, with the help of the debugger, that the register addresses to which the code writes are wrong. For instance, when I try to write to CTRL1, it writes to CTRL2 instead. Or when I try to write to CTRL2, it writes to CTRL1 instead. Or even when I try to write to OUTEN, it writes to the register immediately next to it, MASK.

For some time this drove me insane, how could such simple code not work, until I used the EmbSys Registers debugger (kudos to that. it is extremely useful).

Another problem is within the registers themselves. I noticed that in the FlexPWM reigsters, the bit positions are flipped, as in bit 0 is actually 15, bit 1 is actually 14, and so on. In the following image compare what is written on the Reference Manual, and what the EmbSys viewer shows. However, upon inspection of MPC5744P.h, everything looks file.2021-03-02 00_00_25-MPC5744PRM.pdf - [MPC5744P, MPC5744P Reference Manual] - SumatraPDF.png2021-03-02 00_00_10-workspaceS32DS.Power.2.1 - Debug - FirstProject_src_ExtLed.c - S32 Design Studio.png

0 项奖励
回复
0 回复数