Hi,
I am using SPI communication with a device. This device respond when CS pin is high as soon as data transferred to the device (within 3 micro seconds). This transfer function is called in low priority task. There is a High priority task. When switched to this high priority task, it disables task to do some critical operations. I am using SPI blocking mode. When data is transferred in this blocking mode, it switches to high priority task when meet the semaphore pend of transferComplete.
I tried to solve this problem by following methods,
1. Disabled Tasks before start SPI communication. Then at the end of communication I changed the state of CS pin. Result was the state of CS pin changed before communication ends. I think semaphore pend doesn't work when task is disabled.
2. Tried to solve problem by changing priority of task temporarily at the beginning of the communication. After Change of CS pin state task priority is restored to low priority back. But problem was not solved. I think when meet semaphore pend of transferComplete, it switches to high priority task (I changed priority lower task to more than my second high priority task) because there is no any other work to do.
Only remaining option is to change whole program to SPI call back. But it will take much time.
Highly appreciate any other easy idea to solve my problem.
I am using TI-RTOS for Simplelink Wireless MCUs (version 2.11.1.09)
Thank you