Hello!
I downloaded last Chibios studio , bought STM32F303 Discovery kit and wanted to check the work of LSM303DLHC accelerometr/magnitometr.
So I built chibios2111\testex\STM32\STM32F3xx\I2C-LSM303DLHC example and debug it on STM32F303 Discovery kit.
But when I had received example results using virtual com-port , I found the problem:
- raw and cooked compass data by all axes have zero values, see the example output below.
LSM303DLHC Accelerometer raw data...
X-axis: -704
Y-axis: -128
Z-axis: 7680
LSM303DLHC Compass raw data...
X-axis: 0
Y-axis: 0
Z-axis: 0
LSM303DLHC Accelerometer cooked data...
X-axis: -85.958
Y-axis: -23.443
Z-axis: 945.542
LSM303DLHC Compass cooked data...
X-axis: 0.000
Y-axis: 0.000
Z-axis: 0.000
I tried other STM32 F303 Discovery kit but problem repeated.
Can you help me?
Best Regards
Alexey Gavrilov
Zero compass values in I2C-LSM303DLHC example
Moderators: RoccoMarco, barthess
- RoccoMarco
- Posts: 655
- Joined: Wed Apr 24, 2013 4:11 pm
- Location: Munich (Germany)
- Has thanked: 83 times
- Been thanked: 67 times
- Contact:
Re: Zero compass values in I2C-LSM303DLHC example
Hi Alexey,
I am not having a Discovery F3 with me right now. I will open a ticket and look into it as soon as I get my hand on the board.
What revision of F3 are you using?
I am not having a Discovery F3 with me right now. I will open a ticket and look into it as soon as I get my hand on the board.
What revision of F3 are you using?
Ciao,
RM
RM
Re: Zero compass values in I2C-LSM303DLHC example
Hello!
Thank you for quick answer.
I can't read revision number on the paper sheet attached to STM32F303 Discovery Kit.
So I only red this kit features:
1) STM32F303VC MCU
-STM32F303VCT6 MCU with 72 MHz/90 DMIPS
Arm Cortex-M4 core
perfomance from Routine
Booster (CCM-SRAM)
- 256 Kbytes of Flsh Memory
2) Gyroscope +acceleration &
magnetic sensors MEMS
3)Embedded ST-SINK/V2-B with
USB interface for debugging
and programming
See attached photo.
Hope on your help
Best Regards
Alexey Gavrilov
Thank you for quick answer.
I can't read revision number on the paper sheet attached to STM32F303 Discovery Kit.
So I only red this kit features:
1) STM32F303VC MCU
-STM32F303VCT6 MCU with 72 MHz/90 DMIPS
Arm Cortex-M4 core
perfomance from Routine
Booster (CCM-SRAM)
- 256 Kbytes of Flsh Memory
2) Gyroscope +acceleration &
magnetic sensors MEMS
3)Embedded ST-SINK/V2-B with
USB interface for debugging
and programming
See attached photo.
Hope on your help
Best Regards
Alexey Gavrilov
Re: Zero compass values in I2C-LSM303DLHC example
Hello!
Also when I had connected to device with the STLINK utilty, it displayed the information:
DEVICE: STM32F302xB-xC/F302xB-xC/F358xx.
May be it will be useful for you.
Best Regards
Alexey Gavrilov
Also when I had connected to device with the STLINK utilty, it displayed the information:
DEVICE: STM32F302xB-xC/F302xB-xC/F358xx.
May be it will be useful for you.
Best Regards
Alexey Gavrilov
Re: Zero compass values in I2C-LSM303DLHC example
Also I red in the STLink output:
Device ID: 0x422
Revision ID: Rev Y
Device ID: 0x422
Revision ID: Rev Y
- RoccoMarco
- Posts: 655
- Joined: Wed Apr 24, 2013 4:11 pm
- Location: Munich (Germany)
- Has thanked: 83 times
- Been thanked: 67 times
- Contact:
Re: Zero compass values in I2C-LSM303DLHC example
Hi Alexey,
I am afraid the problem is that ST changed devices on the board. The board that you have looks pretty new to me and the documentation says:
LSM303DLHC or
LSM303AGR
I am afraid your board has the LSM303ASR and not the DLHC. Could you double-check?
I am afraid the problem is that ST changed devices on the board. The board that you have looks pretty new to me and the documentation says:
LSM303DLHC or
LSM303AGR
I am afraid your board has the LSM303ASR and not the DLHC. Could you double-check?
Ciao,
RM
RM
Re: Zero compass values in I2C-LSM303DLHC example
Hi RM!
It is seemed that it is really LSM303AGR acceleration-magnetic sensors on my kit, because when I had changed address of registers from which read data from LSM30DLHC addresses to LSM303AGR addresses, some non-zero values appeared.
I will try to make my I2C-LSM303AGR example on the basis existed I2C-LSM303DLHC example.
Thank you
Alexey
P.S.
Could you check my example when it will be ready?
It is seemed that it is really LSM303AGR acceleration-magnetic sensors on my kit, because when I had changed address of registers from which read data from LSM30DLHC addresses to LSM303AGR addresses, some non-zero values appeared.
I will try to make my I2C-LSM303AGR example on the basis existed I2C-LSM303DLHC example.
Thank you
Alexey
P.S.
Could you check my example when it will be ready?
- RoccoMarco
- Posts: 655
- Joined: Wed Apr 24, 2013 4:11 pm
- Location: Munich (Germany)
- Has thanked: 83 times
- Been thanked: 67 times
- Contact:
Re: Zero compass values in I2C-LSM303DLHC example
Actually if you look into the demo for stm32f4 there is a demo for that mems. The part is supported, you just have to create a custom demo.
Ciao,
RM
RM
Re: Zero compass values in I2C-LSM303DLHC example
Hi RM!
I see that the problem exists in driver functions of devices LSM303DLHC /LSM303AGR .
Function with signature like "isLSM303DLHC()" must exist in driver of LSM303DLHC and function with signature like "isLSM303AGR ()" must exist in driver of LSM303AGR, because it is very difficult to understand which device using without these functions.
Best Regards
Alexey
I see that the problem exists in driver functions of devices LSM303DLHC /LSM303AGR .
Function with signature like "isLSM303DLHC()" must exist in driver of LSM303DLHC and function with signature like "isLSM303AGR ()" must exist in driver of LSM303AGR, because it is very difficult to understand which device using without these functions.
Best Regards
Alexey
- RoccoMarco
- Posts: 655
- Joined: Wed Apr 24, 2013 4:11 pm
- Location: Munich (Germany)
- Has thanked: 83 times
- Been thanked: 67 times
- Contact:
Re: Zero compass values in I2C-LSM303DLHC example
Hi Alexey,
thanks for the feedback. I will consider adding an API in the future that checks the device ID.
thanks for the feedback. I will consider adding an API in the future that checks the device ID.
Ciao,
RM
RM
Who is online
Users browsing this forum: Bing [Bot] and 15 guests