cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with Initialisation of LSM6DSM and LSM303AGR during debugging of SENSORTILE (STM32L476JG) with on-Board ST-LINKV2/1 of Nucleo-F401RE

AGans.1
Associate

Hello all =)

I am pretty much a beginner with STM32 microcontrollers and facing some, at least for me, elusive problems during debugging of the controller.

I am working with the SENSORTILE, so the STM32L476JG controller, which is soldered onto the craddle; MDK ARM Keil uVision V5.26.2.0 and the ST-Link mentioned above.

Short story of the program:

Sensor values of LSM6DSM  (gyro and accelero), LSM303AGR (magneto), LPS22HB (pressure) and MP34DT05-A (audio) are saved on a SD card when a threshold is exceeded.

Now the Problem:

When I am debugging the controller via SWD and the ST-LINK (as recommended on the HP), the LSM6DSM and LSM303AGR sensors aren't initialized properly. The initialisation fails at the "LSM6DSM_0_Probe" (respectively "LSM303AGR_0_Probe") function with BSP_ERROR_UNKNOWN_COMPONENT because the ID isn't right (see picture). Can somebody help me here? When I start the board without debugging, everything works fine and I am able to get sensor values. Anyway it's super hard to insert new functions without the possibility to debug properly. Is it possible that there is a problem with pin sharing of the SPI when debugging and connecting to the sensors?

EDIT:

Base for the implemented program is the STSW-STLKT01 Firmware.

0693W000001sdD2QAI.jpg

Hope, I mentioned everything that is needed, if not please let me know.

Thanks in advance!

0 REPLIES 0