Skip to content

ECG Heart Monitor and Disease Detection using TensorFlow Lite on STM32 Microcontroller

Notifications You must be signed in to change notification settings

djzenma/ECG-Heart-Monitor-STM32-TFLite

Repository files navigation

ECG Heart monitor using the STM32 Nucleo Board and TensorFlow Lite

Both the Report and the Presentation explaining the Project in great details are found in the Report_Presentation Folder.

Documentation

Below is the documentation for the most importatnt functions. More documentation is found inside the code itself.
Convention: functionName : parameter1, parameter2, ... : return value1, return value2, ...

Main

  • HAL_TIM_PeriodElapsedCallback : void : void

  • Callback whenever the Timer TIM15 raises an interrupt (when the timer == value AR register) This is where the ADC performs the conversion.
  • main : no arguments : returns void (never returns)

  • Check if ready then performs inference and outputs the result using UART2.

app_x-cube-ai.c

  • aiInit : ai_u8 activations : void

  • Initializes the Neural Network
  • aiRun : const void * in_data (input float buffer with the 187 ECG samples), void * out_data (output int buffer of size 5 (5 classes)) : int (prediction status)

  • Performs the Inference
  • MX_CUBE_AI_Init : void : void

  • Calls aiInit
  • MX_CUBE_AI_Process : void : int (the prediction class)

  • Initializes the input buffer by converting the ECG buffer to bytes then feeding it to aiRun which outputs the prediction then the predicted class is returned

About

ECG Heart Monitor and Disease Detection using TensorFlow Lite on STM32 Microcontroller

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published