Is it possible to use a mutex (or semaphore) to control the access to a peripheral within one task?
I want to implement a block data transfer. Therefore I want to generate a mutex which is taken before the data is written to the peripheral. If the peripherals FIFO is empty I want an interrupt service routine to give the mutex back so that the next data can be sent.
I have already tried to implement this behavior but without success.
The xSemaphoreTake(SBP_ClientTxSem, 0x00) function does not block before the mutex was given by the ISR. This produces data loss.
Can anybody help me? regards
Unfortunately I misinterpreted the sentence “A block time of zero can be used to poll the semaphore.” It works perfectly. Thank you