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.

LAUNCHXL-F28379D: Cannot Acknowledge an IPC Flag

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hello,

I need help ...

My application uses 2 cores.

When CPU1 send a message to CPU2, I set an IPC  (SET register thanks to IPC_setFlagLtoR function) Flag which generates an interrupt for CPU2. In the ISR, I acknowldge this Flag in its STS Register by setting the corresponding bit in the ACK Register (IPC_ackFlagRtoL function). The CPU1 waits for this acknowledgment polling its FLAG Register (IPC_waitForAck function)

I have 2 communications.

For the first one:

---------------------

CPU1 --> CPU2: Flag IPC0

CPU2 --> CPU1: Flag IPC1

For the second one:

--------------------------

CPU1 --> CPU2: Flag IPC2

CPU2 --> CPU1: Flag IPC3

Down here the SysConfig file:

Everything works well for the first communication, but for the second one, although the CPU1 ask for a ACK in its ISR, the Flag of CPU2 is never reset:

CPU2:

CPU1:

I checked with the debugger:

- the code runs into the ISR IPC_3

- the code runs into the function IPC_ackFlagRtoL(IPC_CPU1_L_CPU2_R, IPC_3)

- The code never goes out from the function IPC_waitForAck(IPC_CPU2_L_CPU1_R,CPU2_to_CPU1_IPC_FLAG3);

Please note that I ask for the Flag to be set each 300ms (each time I receive a CAN frame)

Has anybody any ideau that can help me ?

Thnank you.

  • Hi,

    Please allow me to get back to you about this tomorrow.

    Thanks,

    Ben Collier

  • Hello Benjamin,

    I did some tests that can help you.

    I reproduced the issue on the LED blinking example (see the attached archive)

    In the CPU2 main loop, I only inserted the set of the IPC Flag:

    With FLAG1, everything is fine: CPU1 acknowledges the Flag in the ISR

    With FLAG3, the red LED stops blinking because the code never goes out from the WaitForACK loop:

    Could you look at the archive I joint ? (it does not contains any application code, just TI example + IPC) 

    I would be great to have a answer tomorrow.

    Thanks a lot.

    Vincent.

    2024_06_27_IPCIssue.zip

  • Vincent,

    Could you look at the archive I joint ? (it does not contains any application code, just TI example + IPC) 

    I would be great to have a answer tomorrow.

    Unfortunately I will be out for a week and will not be able to look at this until around July 8th.

    My debug advice for you is to try using the debug probe to set the ACK bit for IPC3 manually once you get stuck at this point.

    If you find a solution by manually writing these bits, then I think you will have a good idea for how you need to change your code to get past this.

    Best Regards,

    Ben Collier

  • Hello Benjamin,

    I took your advice into account, and came to try the ACK with the bitfield:

    It works, but it is very important for me to understand why. My goal is to use DriverLib, not BitFields for this project.

    Has DriverLib any problem ? (it is more likely that I made a mistake, I know)

    Can you please make the test as soon as possible, and come back to me here ? 

    Speak you soon.

    Vincent

  • Vincent,

    I should be able to look into this around July 8th. I'm glad that you have something that works for now.

    Best Regards,

    Ben Collier

  • Hello Benjamin,

    Honnestly I am not sure if there is a problem or not with DriverLib, but I prefer to close this issue.

    Actually, the while loop in the WaitForACK function causes problems when using multiples Interrupts (because Interrupts cannot be easy Nested on C2000.

    Maybe I will comme back to you in another discussion after some tests.

    Speak you soon.

    Vince