Skip to content

Releases: cybernethica-cordis/STM32-HCSR04-HAL

Initial Release

18 Mar 19:14
Compare
Choose a tag to compare

Features

  • Temperature-compensated calculation: 20°C default
  • Pulse width validation: 100–25000 µs (~1.7–425 cm), hardware timeout (30 ms)
  • Noise filtering: 3-sample moving average
  • Diagnostics: UART output @ 115200 baud (for real-time debugging)

Hardware Support

  • MCU: STM32F446RET6 (Nucleo-64)
  • Sensor: HC-SR04 Ultrasonic

Pre-built Binaries

  • HCSR04-UART-HAL.elf: Firmware file in ELF format (for debugging and development)
  • HCSR04-UART-HAL.bin: Firmware file in binary format (for flashing onto the MCU)

Checksums

  • HCSR04-UART-HAL.elf: f9b950dd1d6cd54f41f8bb25eae6cf492fc0faf51f0e445a234141d0c680f81c
  • HCSR04-UART-HAL.bin: 08924f3c5479d4a6d00dd415fa0d301d67dd09f6d61f4fddd2fd9069bd846cc6

To check the integrity of the downloaded binaries, run the following command in your terminal:

sha256sum HCSR04-UART-HAL.elf  
sha256sum HCSR04-UART-HAL.bin

Alternatively, you can use the following command to directly check the checksums:

echo "f9b950dd1d6cd54f41f8bb25eae6cf492fc0faf51f0e445a234141d0c680f81c HCSR04-UART-HAL.elf" | sha256sum --check  
echo "08924f3c5479d4a6d00dd415fa0d301d67dd09f6d61f4fddd2fd9069bd846cc6 HCSR04-UART-HAL.bin" | sha256sum --check

Note: If the output does not match the provided checksums, do not proceed with flashing the firmware, as the file may have been corrupted during download. In such a case, re-download the file and check the checksum again.

Documentation