Hello,
I am very new at TIRTOS and still learning so I have a pretty basic question for you
i am trying to implement the simple task of reading a register from an accelerometer via SPI and posting the value on the LCD, both of them are sharing the same SPI0 module, the idea is each half a second read the data from a register . That task I want to make it using TIRTOS
I created a TIRTOS project with a single task, in that task I:
1- initialize the accelerometer (SPI_open)
2- send the control byte and receive the response
3- close the accelerometer (SPI_close)
4- open the LCD (LCD_open)
5- put the data on the LCD
6- wait half a second
7-close the LCD (LCD_close)
8-repeat 1
in the first loop everything goes well but from the second loop on the SPI_open does not work anymore, some one suggested me to use separate tasks with a semaphore but I am not sure if I have to open and close or initialize each device with each cycle..
any help will be greatly appreciated
BTW i am using the CC2650 EM over a SmartRF06 DK and the LCD routine and the accelerometer routine when working by themselves are working fine.