Non Blocking IO Port using ThreadX

Hi 

   I am using Synergy S7G2  MCU, I have run into a peripheral device which uses Two-Wire Serial Digital Interface (Not I2C) more of a Two wire SPI version. In this device  I need to POLL the Input and wait for the the Input to get High and after that send clock cycles to fetch the data I do not want to poll the input as the device takes a lot of time 10ms for the data to get ready and other processes stall (Graphics etc.) due to polling.

Is there a non-blocking way to poll the Input pin of the device, I do not have any IRQ input pin available! Is it possible to poll the input state using threads or any framework so that the thread waits for the input and processes it whenever the input is available so that other threads work properly.

Warm Regards

Pranav

Parents
  • You haven't said which Synergy device you are using or how you are actually interfacing to the peripheral. If you are using an SPI peripheral (Simple SPI on SCI, or RSPI) you could switch the input pin to a GPIO input pin (using the ioport API), then poll the input level of the pin until you get the required level (again, using the ioport API), then do the transfer.

Reply
  • You haven't said which Synergy device you are using or how you are actually interfacing to the peripheral. If you are using an SPI peripheral (Simple SPI on SCI, or RSPI) you could switch the input pin to a GPIO input pin (using the ioport API), then poll the input level of the pin until you get the required level (again, using the ioport API), then do the transfer.

Children