cant write in MPC5744P performance monitor registers

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

cant write in MPC5744P performance monitor registers

3,093 次查看
billie60
Contributor I

Hello!

I am trying to set a performance monitor interrupt with MPC5744P. I init PM registers in the startup.s. 

fd1a2a18cb4db1bf06dbdd941d2065a.jpg

 I can't read the values of PM registers in the register view in S32DS. So I check those values by 'mfpmr'. But when I read the value of r7, I can't see what I set. There are all 0 in this register. Is there something wrong with my settings?

2b764d26a354e62953fc860d9342601.jpg

Please help me.

Thanks 

0 项奖励
回复
7 回复数

3,084 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Have you tried to put breakpoint between writes and read? I wonder whether synchronization instruction is not required. although I have found any evidence for it.

0 项奖励
回复

3,074 次查看
billie60
Contributor I

Hello.

I had put breakpoint between write and read.

Like this: 

ae1142a5ebf892734eb725f97e69a39.jpg

And when i put breakpoint after 'MFPMR r7, 400'.    r7 = 0.

c1b8d84e6822c8e594e7c57af2c5b64.jpg

I have no idea about this. Do you know what caused it, or do you know what I should do?

This .txt file is my startup.s.    And I use MPC5744P to do this.

Best wishes

Thank you

0 项奖励
回复

3,055 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

I have meant whether it behaves same way when you debug the code step by step.

0 项奖励
回复

3,052 次查看
billie60
Contributor I

Hi David

I'm afraid not. PM counter cannot count. And the project cannot enter the interrupt. I read "EREF 2.0: A Programmer’s Reference Manual for Freescale Power Architecture® Processors". It said:

72aeca19e4b5ae2a6f592fb5b800e9d.jpg

 It looks like the problem I met. But in MPC5744P, MSR does not have [GS]. I have changed MSR[PMM] = 0. It does not work. I also add 'se_isync' after every 'mtpmr' instruction. It does not work, too. Does MPC5744P have a [GS] or what can I do for this?  There are the RM of above and RM of MPC5744P. 

PS: EREF 2.0 supports e200 core family and e200 includes MPC5744P. Why they have different MSR?

25a0e4dbdd908a17744e0f64739b55a.jpg

ea976cb63718b832e26c8e4fbbaf0a2.jpg

please help me.

Thank you so much. 

 

0 项奖励
回复

3,048 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

EREF is generic manual for multiple platforms.

AN4341 is using e200z760 where MSR does not have [GS] as well so I dont think it is the reason.

e200z4251n3 used with MPC5744P device has Performance Monitor implemented so it should work.

0 项奖励
回复

3,040 次查看
billie60
Contributor I

Hello, thank you for your reply. I believe that performance monitor can work. But the question is performance monitor in my project cannot work. So do you have any example of performance monitor interrupt in MPC5744P? It will very helpful for me. Thank you so much. 

0 项奖励
回复

3,020 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

I just found presentation mentioning some changes between C90 (MPC56xx) and C55 (MPC57xx) implementation:
https://www.nxp.com/docs/en/supporting-information/ftf-acc-F1184.pdf

Maybe it helps

0 项奖励
回复