Skip to content

This is an attempt of writing an alternative firmware for the LD1125H FMCW radar to extract raw ADC values from the Echo/Bang signal via high-speed UART.

License

Notifications You must be signed in to change notification settings

dm5tt/LD1125H_Firmware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this thing?

This is a attempt of writing an alternative firmware for the LD1125H FMCW radar to extract raw ADC values from the Echo/Bang signal via high-speed UART.

The hardware reverse engineering part was done in this article.

How to compile

First prepare CMake

# mkdir build
# cd build
# cmake ..

Then you can build targets

# make hello_world

which will spit out .elf, .bin and .hex files.

Build Targets

hello_world ✓

This target is a basic test to verify if the clock configuration, RTOS and UART is working correctly.

Connect a UART to PA10 (TX) and PA9 (RX) using a FTDI like FT232H at a baudrate of 4MBaud to see a text being printed out every second.

cw_radar ✓

  • Set the DAC to a static value
  • Sample the Bang signal at 50kHz with ADC DMA into a double buffer
  • Output it to the serial port buffer using UART DMA TX
  • Visualize in Python (FFT)

vlcsnap-2024-12-28-21h09m07s086

LD1125H shows the FFT of the Bang signal of a spinning fan

Beware: there was a slight offset in the Python windows when I zoomed into the signals. I really starts a 0 and then increases with direct relation to the RPM of the fan.

Credits

Template heavily adapted from https://github.com/djix123/GD32F303CG_CMake

Linker Scripts and Startup from https://github.com/cjacker/gd32f30x_firmware_library_gcc_makefile

OpenOCD script https://github.com/gd32-rs/gd32-openocd

About

This is an attempt of writing an alternative firmware for the LD1125H FMCW radar to extract raw ADC values from the Echo/Bang signal via high-speed UART.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages