This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-AM243: M4F core is already running when debug starts

Part Number: LP-AM243
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hello;

Sometimes when I try to Debug all cores together, all r5 cores are naturally suspended waiting for me to click the "Resume" button. But strangely I see that the M4F core is already in the "Running" state. When this happens, my applications do not work properly.  I am sharing the image showing my core states before clicking "Resume" after pressing the Debug button. You will see while all cores are suspended M4f is already running.

Can you please help on how to fix it?

Regards

Kadir

  • Hi Kadir,

    Thanks for your query.

    Please tell us which MCU+SDK version are you using?

    What application are you trying to run on M4F core?

    What all applications are loaded on R5F cores? Are this application dependent on each other?

    Is there any shared resource used between these cores? 

    Regards,

    Tushar

  • Hi Tushar;

    I use MCU plus SDK -> mcu_plus_sdk_am243x_09_02_00_50
    I created my own application that implements IPC. 

    I took the "IPC RP Message Echo" SDK sample project as a reference and all sysconfig settings are the same as this project. There is an application that sends and receives RPMessage 16 byte data in all r5 cores and m4F section. In my application m4F starts sending messages and receives response from all 4 R5 cores. Yes there is shared memory between cores.

    Regards

    Kadir

  • Hi Kadir,

    Thanks for providing the above details.

    When you say M4F core is running, Is it after loading the program to M4F the core is not halting at main() function?

    Before loading program to M4F core, Are you doing a CPU reset?

    Can you halt the M4F core and see which code it is trying to execute during the abnormal state?

    Regards,

    Tushar

  • Hi Tushar;

    *When you say M4F core is running, Is it after loading the program to M4F the core is not halting at main() function?

    Yes you are right.  It is after loading the program to M4F the core is not halting at main() function.

    *Before loading program to M4F core, Are you doing a CPU reset?

    No, I am not doing CPU reset. Should I? When I use "Reset" button before debug on the launchpad, this abnormal state does not occurs.



    *Can you halt the M4F core and see which code it is trying to execute during the abnormal state?
    I can not see to the resource -> HwIp_hardFault_handler() at HwiP_armv7m_handlers_freertos.c:63 0x00006F04


  • Hi Kadir,

    No, I am not doing CPU reset. Should I?

    Yes, it's always recommended to do CPU reset before loading program to a core.

    After resetting the CPU, are you able to load the program successfully?

    When I use "Reset" button before debug on the launchpad, this abnormal state does not occurs.

    You should not do a System Reset. It will do a warm SoC reset and all the cores will be in WFI mode.

    You should only do CPU reset for a specific core on which the program is supposed to be loaded.

    I can not see to the resource -> HwIp_hardFault_handler() at HwiP_armv7m_handlers_freertos.c:63 0x00006F04

    The CPU might be in invalid state when you try to load program without resetting the core and it is going to fault handler.

    Regards,

    Tushar

  • Hi Tushar,

    Thanks for your response. It looks like I need to reset CPU before debugging. Hopefully this would fix my problem. I am just wondering  how to do CPU reset. Could you give brief information about that?

    Best

    Kadir

  • Hi Kadir,

    I am just wondering  how to do CPU reset. Could you give brief information about that?

    Select the core from the target configuration file which you want to reset. Click on the reset icon and click on CPU reset option.

    Please refer below image for detail.

    Regards,

    Tushar

  • Hi Tushar,

    Thank you so much!

    It seems like CPU reset is possible when the core is suspended. When it comes to my problem, beginning of debug it does not stop on main this means it starts in "Running" mode not "Suspended"

    Is it possible to CPU reset while the core is in "Running" State? Depending on the system reset fixes my problem, do you think CPU reset fixes my problem too??

    Regards

    Kadir

  • Hello Kadir,

    Is it possible to CPU reset while the core is in "Running" State?

    You can halt the CPU before doing a CPU reset. Please refer below image.

    Regards,

    Tushar