TIDUF81 November 2024 AFE4960 , CC2674R10 , TMP119
Figure 3-11 shows the flow chart of the biosensing demonstration for CC2674R10. The program is based on TI Real Time Operation System (TIRTOS7). Thus, the microcontroller maintains several tasks and performs the task according to the priority level.
There are three tasks established in the
biosensing demonstration program. BLE_stack_task
is the basic
function for Bluetooth® Low Energy setup, connection, transmitting and
receiving data.
Project_zero_task
is the custom task for the, Generic Access Profile (GAP), Generic Attribute Profile (GATT), and GATT Specification Supplement (GSS) configuration. Also, temperature sensor and accelerator are initialized in this task. A timer is set to read these two sensors every 1s and send the notification out.
AFE4960_read_task
is programed to
initialize the device and wait for the interrupt from the ADC_RDY pin and the GPIO2
pin. Once the FIFO_RDY interrupt occurs, CC2674R10 reads all the data out from the
FIFO by SPI. To avoid the ECG data mismatching, the length of the data equals to the
FIFO length set by the REG_WM_FIFO register. After the SPI read, the
Bluetooth® Low Energy transmitting task is awakened to send the ECG
data out by notification.
In this design, the FIFO length is set to be 108, which are 432 Bytes read out during 2 FIFO_RDY interrupts. Since the maximum transmission unit for Bluetooth® Low Energy 5.3 is 255bytes, the notification API is called twice to send all the data out. After sending the data, the AFE4960_read_task is blocked to wait for the next interrupt from FIFO_RDY.