Hello,
I have developed a USB UART composite in order to receive data from Linux PC using USB connection.
The link is up and I can receive data in Linux PC from Z2_2 using uart (/dev/ttyACM0 is detected)
but when I sent data from PC to Z2_2 core (MPC5748G), I received for a moment but after that Z2_2 is blocked seems it slept.
When I have made a pause of execution using PE Micro debugger I have seen this handler that it blocks "WKPU_31_24_IRQHandler() at 0x1402bc8"
My startup_MPC5748G.s contains this config:
NOTE: There are no C implementation for the function WKPU_31_24_IRQHandler()
Why I had this kind of issue and how can I fix it ?
as a first step, I would check WKPU registers if an interrupt or wake up event is enabled in WKPU (accidentally or intentionally). If not, it's some kind of runaway and more debugging will be necessary.
Regards,
Lukas
Hi @lukaszadrapa,
I have tried to disable WKPU IRQ but I still have a block of Core Z2_2 but in another WKPU handler "WKPU_23_16_IRQHandler() at 0x1402bc8"
Here the status of WKPU registers before disabling IRQ:
Here the status of WKPU registers after disabling IRQ:
Regards
I missed that IVOR1 was triggered before that according to call stack. Core register MCSRR0 should contain address of instruction which caused the error / IVOR1 and MCSR should contain the reason of this error. Could you check these two registers?
Regards,
Lukas
Hello @lukaszadrapa,
I have added this function:
void IVOR1_Exception_Handler(void)
{
while(1);
}
How can I know the root cause of this kind of errors / exceptions ?
Can I fix IVOR even with a workarround in the exception Handler function ?
Ok, if SPR registers are not already visible, you can enabled them in:
Window -> Show View -> Other
Here select:
And then you will see:
Once you reach the IVOR1 handler, you need to check the content of MCSRR0 here. It will contain address of instruction which caused the error. Then you need to find this instruction in your code. An option is to go to Diassembly window and put address there like:
Based on the content, next investigation will be needed.
Regards,
Lukas
Hello @lukaszadrapa,
Thanks for your support.
I have tried to read registers when I have IVOR1 but no addresses are displayed.
You can see below:
How should I proceed in this case.
Thanks in advance of your support.
This is copied from the user manual:
And:
Regards,
Lukas