Skip to main content
Associate II
February 12, 2025
Solved

LSM303DLHC software

  • February 12, 2025
  • 4 replies
  • 1164 views

Hi There

Where I can find some source files for LSM303DLHC

I see some ref.links there, but right now they pointed to non-existed pages on github :( Or I miss something

Also I found this link https://github.com/STMicroelectronics/stm32-lsm303dlhc but it contain some "Common/accelero.h" and I also can't find it on github :(

Regards, Evgenij

Best answer by Peter BENSCH

I'm sorry that you were misled a bit. The URL you mentioned on Github only contains the actual ‘component’ of the LSM303DLHC, the other references are contained in the firmware packages of the STM32F, STM32G0 and STM32L, unfortunately apparently not (anymore) in the Github repository. However, you can find and download the entire packages here.

Apart from the parameter LowPower, which only seems to be relevant for the STM32L, the header files are identical.

Hope that helps?

Good luck!
/Peter

4 replies

Peter BENSCH
Peter BENSCHBest answer
Technical Moderator
February 12, 2025

I'm sorry that you were misled a bit. The URL you mentioned on Github only contains the actual ‘component’ of the LSM303DLHC, the other references are contained in the firmware packages of the STM32F, STM32G0 and STM32L, unfortunately apparently not (anymore) in the Github repository. However, you can find and download the entire packages here.

Apart from the parameter LowPower, which only seems to be relevant for the STM32L, the header files are identical.

Hope that helps?

Good luck!
/Peter

LoMo-MoMoAuthor
Associate II
February 12, 2025

Thanks, I download it right now! This zip file include everything!

but, as I can see, LSM303DLHC doesn't support in "X-CUBE-MEMS1"

only LSM303AGR and ISM303DAC supported, correct?

Ozone
Principal
February 12, 2025

The "old" F303-Discovery board firmware package contains examples for the LSM303DLHC, since this board came with such an e-compass device.

When I last checked, it was still up for download.

 

Peter BENSCH
Technical Moderator
February 12, 2025

@LoMo-MoMo Please note that the LSM303DLHC has already been discontinued and is therefore no longer officially supported and the associated documentation will soon be removed from the website. There is no pin-compatible replacement for it because it still has the comparatively huge LGA-14 housing with 3x5mm, while newer sensors have the LGA-12 with 2x2mm.

LoMo-MoMoAuthor
Associate II
February 12, 2025

its clear, that's smartphone market with huge volumes demands low power low voltage solutions with small footprint, but also clear, that's small volume projects, like 500pcs/year will not use 2x2 LGA12 footprint with 1.8V core... if you will try to find some "factory" who will agree to solder 10-20pcs of LGA-12 per month you will understand why I'm interesting to use LSM303DLHC instead of ISM303DAC :) (but, you know, its just a usual problem for low volume projects)

Ozone
Principal
February 13, 2025

As a side note, the interface of the LSM303DLHC magnetometer part is identical to the HMC5883L from Honeywell.
Especially the I2C addresses, internal register addresses/offsets, and ID values returned (device ID).
They differ in certain key configuration settings, and consequently device parameters (e.g. full-scale range, update rates).

Visitor II
February 13, 2025

Thank you so much for the solution, You solved my problem also.