STM32 · Embedded · 06

Streaming Waveforms over USART2 to SerialChart

Using the ADC/UART note, I retraced HAL_ADC_Start, PollForConversion, GetValue, and USART2 transmission. The saved SerialChart configuration uses COM6, 115200 baud, and fields spanning 0-3.3 V and 0-4096 ADC counts.

Powered NUCLEO-F411RE and breadboard status LED during UART checking

What I checked first

Using the ADC/UART note, I retraced HAL_ADC_Start, PollForConversion, GetValue, and USART2 transmission. The saved SerialChart configuration uses COM6, 115200 baud, and fields spanning 0-3.3 V and 0-4096 ADC counts.

Source view

  • The line format separates sample index, timestamp, raw ADC, moving average, and filtered voltage.
  • Each sample ends with CRLF so SerialChart can keep reading consistent fields.
  • The illuminated LED confirms power/status only; it is not proof of waveform quality.

Code path

sprintf((char *)TxData,
        "%lu,%lu,%lu,%lu,%.6f\r\n",
        sample_index, timestamp_us,
        ADCValue, Smooth_ECG, ECG_Filtered);
HAL_UART_Transmit(&huart2, TxData, strlen((char *)TxData), 10);

Key terms

  1. USART2
  2. 115200 baud
  3. CSV framing
  4. SerialChart

Review sequence

  1. USART2
  2. 115200 baud → CSV framing
  3. SerialChart

Official references

The reviewed sources contain 22 prototype photos, a 40-slide STM setup deck, a three-page KiCad schematic, an ADC/UART note, an HRV module, two PPG code records, twelve top-level ECG C variants, and a complete CubeIDE project archive. I do not count byte-identical variants or ST/Arm vendor files as separate results, and I make no new performance claim without saved measurements.

Publication first-page preview