HAL library 05- OneWire for STM32Fxxx

Next port from STM32F4xx STD drivers to STM32Fxxx HAL drivers was done for OneWire library. This library is protocol based only. It features basic functions for read/write byte, reset port and search devices on OneWire port.

1-Wire is a device communications bus system designed by Dallas Semiconductor Corp. that provides low-speed data, signaling, and power over a single signal.

It’s used in some temperature sensors, like DS18B20 temp sensor and many others products from Dallas.


Read more about new HAL libraries


  • Read/write byte
  • Search for devices on 1-wire pin
  • Read rom from device
  • Unlimited OneWire ports on STM32Fxxx
      • This allows you to group sensors to separate ports to prevent communication failures if one sensor is broken


  • HAL
  • TM
    • STM32Fxxx HAL
    • defines.h
    • GPIO
    • DELAY

Functions and enumerations

Example 1

Example 2

Project is available on Github, download all libraries below.


Owner of this site. Application engineer, currently employed by STMicroelectronics. Exploring latest technologies and owner of different libraries posted on Github.

You may also like...