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.

SEM_pend not timing out

I have code:

                        if (SEM_pendBinary(&SEM_collect, DMA_Timeout) == 0)

I've been using this for a while, but now I'm trying to glue the DMA to the SPI. The transmit events are not occurring, so the DMA transfer does not occur. Although I know I need to debug that, I'm concerned that the timeout does not occur. I've seen the timeout occur before I glued the SPI to the DMA, so I'm assuming it is associated with that. Any hints as to why the timeout does not occur? That is, I don't mind that I don't get the TCC interrupt that posts the semaphore. I mind that it doesn't timeout when it doesn't get it.

  • Flamingo,

    I have some suggestions on what to check.

    1) The semaphore could possibly be returning "TRUE" in case it is available and your code is possibly not checking that;

    2) Make sure that you have the projectcfg.h (where "project" is your project's name) header file included in the C file that you have this piece of code;

    3) Make sure that you did not min the binary semaphore APIs with the regular semaphore APIs.

  • 1. I'm checking and I have successfully tested both cases with the memory to memory transfer.

    2. I'm not getting a compile error, so I'm not sure what your concern is. As I mentioned in my reply to 1, both cases worked with memory to memory transfers.

    3. I did not mix them. I've double checked.