This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC2640R2F: How to make project structure? where multiple sensors are available with many functionality?

Part Number: CC2640R2F

Tool/software: TI-RTOS

Hello everyone,

I am working on a device which GPS, OLED, IMU sensor. Right now I am in confusion about my project structure and handling of sensors data. In my project, I want to run GPS and IMU sensor in real time. GPS data read frequency is 1 Hz, I am using UART with 9600 bps baud rate to read GPS data and I2c to read IMU data. The GPS data buffer size is 1000 of type char and it takes almost 1 sec to read complete buffer. My question is, How should I handle both IMU and GPS in real time. So the device can detect the motion in real time and fetch the latitude-longitude in real-time, after detecting some motion device has to display some data and distances, while displaying data device has to scan for other nearest device also. The device is working as advertiser and observer both. So, can anyone please suggest me how to handle everything. What should be the structure, How many task and event I need to create. 

Thank you

  • Hi Pradeep,
    I suppose the IMU can output an interrupt to a gpio which triggers I2C read and GPS data fetch. Then populate advertisement data and keep updating the advertisement data every second. How fast latency do you need on the advertisement data?
  • IMU data rate is 50 Hz, and GPS data rate is 1 hz. So it is not possible to read both data at the same-time. And i can not read both the sensor data at the same time. RIght now i am raeding gps in a call back function. So whenever GPS read is happing sometimes i miss the IMU data. That is why i am asking how should i read both the data. I am not advertising both the sensor data. I am using these data for calculating some parameters and sending these parameters to the app. And i am sending the data after every 100 ms.
    Thank You for the response.
  • Hello Pradeep,
    Are you familiar with the sensor controller? Maybe it can be of help and be used for the I2C sensor?
    dev.ti.com/.../