Skip to content

Firmware of a small STM32F103C8T6 and DS18B20 thermometer

License

Notifications You must be signed in to change notification settings

alexeychurchill/Thermometer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thermometer

A firmware for STM32F103-based device which purpose is to measure temperature, log it with given period into the flash memory. Data reading is planned to be done through USB. Device also can show immediate temperature, time. It has OLED display.

Project building

Build system

To init build folder, call cmake with the following arguments:

cmake -DCMAKE_C_COMPILER_WORKS=1 
    -DCMAKE_ASM_COMPILER:PATH=[path to ASM compiler] 
    -DCMAKE_C_COMPILER:PATH=[path to C compiler] 
    -DCMAKE_C_OBJCOPY:PATH=[path to objcopy]
    -DFONTS_GEN_UTIL:PATH=[path to ssd1306fnt.py]

IDE

Any IDE which supports cmake projects can be used for work on the project. For example, it's possible to use CLion. To use CLion, do the following:

  1. Open CMake project in the CLion
  2. Go to File -> Settings -> Build, Execution, Deployment -> CMake
  3. Set CMake options: just take them form previous readme section
  4. Set proper Build directory. Usually, it's build

Dependencies

TODO

Just some short notes on things I'm going to do:

  • Refactoring: Stop using __ for file-privates! Remove all existing usages
  • GUI: Add SETTINGS screen
  • GUI: Add LOGGER configuration screen
  • Logging: Implement sleeping mode and wake up by alarm
  • Logging: Implement driver for the W25Q*
  • 1-Wire: Implement CRC calculation
  • 1-Wire: Add errors "management"
  • Refactoring: Simplify 1-Wire driver: just make some kinda FSM!
  • Refactoring: Get rid of OneWire_t1. Just use .h as an interface for other modules. Generally, it would be great to get rid off two 1-Wire headers.
  • Refactoring: Move IRQ handlers outside of 1-Wire drive sources
  • Refactoring: Review DS18B20 driver and clean it up
  • Refactoring: Move all "config" constants to the config.h file (e.g., display size)
  • Refactoring: Refactor UART routines (it requires general heavy refactoring)
  • Display: Use fast-mode (400kHz) I2C
  • Display: Use DMA for frame data transfer
  • General: Implement convenient "virtual timer" using SysTick timer
  • USB: Implement MSC USB device
  • USB: Implement FAT16 emulation Investigate!
  • USB: Implement temperature logs file emulation Investigate!

To be continued...

Footnotes

  1. Access to several different 1-Wire busses can be organized in easier and more logical way. For example, we can pass bus number to the 1-Wire functions. Or, just use another alternative.

Releases

No releases published

Packages

No packages published

Languages