Hello!
I am trying to set a performance monitor interrupt with MPC5744P. I init PM registers in the startup.s.
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?
Please help me.
Thanks
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.
Hello.
I had put breakpoint between write and read.
Like this:
And when i put breakpoint after 'MFPMR r7, 400'. r7 = 0.
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
I have meant whether it behaves same way when you debug the code step by step.
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:
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?
please help me.
Thank you so much.
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.
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.
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