Hi,
I have a single GIO object which I create using GIO_create with IOM_INOUT mode. I am using this for SPI reads and writes which are done by three different tasks. That means my single SPI channel object is being shared by three different tasks. I read in the BIOSPSP_SPI_Driver_Design document (this is the document in the Program Files/Texas Instrument/pspdrivers... folder) section 2.1.2.2.1 that a single channel handle cannot be shared between tasks.
My problem is that after my application runs for a while the internal semaphore which the SPI driver uses to synchronize multiple tasks blocks all the three different tasks using the SPI interface. Note that for my purpose I am using GIO_write and GIO_read which are blocking and not GIO_submit but they should work fine within tasks.
I tried creating other channel handles with GIO_create so I can use them in the different tasks but GIO_create returns NULL. Is it possible to create other channel handles on the same device instance as the document suggest to do?
Also in the SpiLocal.h file there is the Spi_Object struct which has this member variable
Spi_ChanObj chanObj[Spi_NUM_CHANS]; but I can't find where this value is set. Does this parameter determine the number of channels I can create on the device? Also is creating my channel in IOM_INOUT ok? In the SpiLocal.h file before the Spi_ChanObj structure the comment is that "This mini driver must be opened for input and output separately". Does this mean I can't do IOM_INOUT? Thanks