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.

CCS/AM5728: AM5728 uses Semaphore_pend() to implement thread hang operation

Part Number: AM5728
Other Parts Discussed in Thread: OMAP-L138, , SYSBIOS, OMAPL138

Tool/software: Code Composer Studio

Dear All,

Customers used OMAP-L138 before, and now upgrade the product to AM5728. 

When debugging AM5728, they encountered problems in inter-thread communication. They used thread 1 to send data and thread 2 to receive data.

In thread 2, while (1) is used to perform a dead loop waiting for data reception. After receiving the data, the counter adds one, and the program function is normal. But if the Semaphore_pend() function is added to the while (1) dead loop to suspend the thread,the counter in the program does not add 1.

Our customer said that the Semaphore_pend() function can exit the pending operation in advance when the thread receives the data.

We hope TI can help confirm the functionality of the Semaphore_pend(). Can this function cause thread abnormal? 

If we can get to the customer source code, can you help us analyze it?

Best Regards.

Kevin Chen

  • Which Processor SDK RTOS is this?

    Best Regards,
    Yordan

  • AM5728.rar

    Dear Yordan,

    Earlier, customers mentioned that it was a Linux system. I've got the customer source code. You can help me analyze it. Thank you.

    Best Regards.

    Kevin Chen

  • Kevin,

    You have zipped the SYSBIOS packages folder and provide in the E2E. Can please indicate where we can find the customer code in the archive?

    Please also indicate if the code is being developed on A15 or the DSP on AM572x ? Both OMAPL138 and AM57x are ARM+DSP devices. Is the handle to the semaphore being discussed, defined as a global that can be shared across tasks. Can the customer look at audio example in the PDK for AM572x and see how similar receive and transmit semaphore are managed in the file audiosample_io.c in the folder:

    pdk_am57xx_1_0_xx\packages\ti\drv\mcasp\example\src

    the RTOS specific code on OMAPL138 should pretty much run as is on AM572x One major difference for ARM developers though is that OMAPL138 used TI ARM compiler for ARM9 while on Cortex A15, we support on Linaro GCC compiler.

    Regards,

    Rahul

  • Dear Rahul,

    Thank you for your advice. I've already fed back your suggestions to the customers and they are searching for the code.

    Except the SYSBISO, I have uploaded another file, SYS, which is part of the client's source code. Can you help me check the code? Thank you.

    Best Regards.

    Kevin Chen