I started working with the MPC5777C_MCAL4_3_RTM_1_0_0_Sample_Application (Lighting app) on my MPC5775E EVB Kit but it gave IVOR6 which I fixed by correcting the flash_vec from 0x00FE0000 to BE00000 as MPC5775E supports only 4MB unlike its MPC5777C (8MB Flash) counterpart
flash_vec : ORIGIN = 0x00BE0000, LENGTH = 0x010000
Now this sample application is without OS and uses the HW interrupt vector and requires the PIT interrupt for round robin scheduling of the tasks.
The PIT interrupt is not triggered and the task are not getting executed.
Below is the PIT register and CVAL1 Value never changes 0x11940 and TFLG is not set.
But I could see the OCU EMIOS_1Ch0 hitting as shown below
Please let me know why the sample application doesn't work?
Please try to disable "GptFreezeEnable" and see whether the TIF can be set:
@namnguyenviet It works now.
When I try to run the code with debugger its all fine but when try to power cycle it doesnt run.
I am using S32DS to flash the elf using the OpenSDA. I tried to debug by adding an additional GPIO and it wont even toggle this pin when without the debugger. Please help!
Not sure how it could be the issue... Please share the application so I can double check.
After some comparison between your app and my app, I could spot the issue: in Vector_vle_core_diab.s ( for diab compiler) and Vector_vle_core.s (if using other compiler), the reset configuration word is set as 0x005A0002, in which VLE = 0.
It should be set as 1, in order to be able to execute NXP VLE code. After modifying the rcw to 0x015A015A:
the application can be run without debugger, i.e. after performing a reset.
@namnguyenviet Thanks for the reply and it works.
But the PIT interrupt wont work if running without debugger. I had to enable GptFreezeEnable to make it work but then it wont work when in debug mode. Could you please enlighten me more on this issue? How to overcome this?
Many Thanks for your help!
That's weird... in my site the PIT interrupt works in both GptFreezeEnable enabled and disabled (although I have been working with 5777C instead of 5775E due to fact that 5775E is not available in my site, I supposed they are sharing the same behavior). The following thread might be related to your issue:
You can try to create a demo based on MPC5777C MCAL and verify the PIT interrupt.
@namnguyenviet Thanks for the link!
So far I didn't change the ResourceSubderivative to MPC5775E from MPC5777C, but when I change I get 6 below error in MCU module. Could you please let me know the reason for this ? I didnt expect any change here as two are similar.
It's because the following reasons:
1. SIU_LFCLKCFG seems to be not able to be configured in MPC5775E
2. PSI5 is not available in MPC5775E
Please fix those errors and re-generate the code.