STM32WL55JC1 - LoRaWAN_End_Node (CubeWL latest version) : I can't use I2C in this sample code (STM32WL)
Hi,
I use an Nucleo-32WL55JC1 with one MS5637 (pressure sensor).
(The point is not the precise sensor but the I2C communication. )
In CubeMX, I designed the pins :
In main.c, I added :
I2C_HandleTypeDef hi2c1;
And in the main function :
BSP_LED_Init(LED3);
And in the error handler :
In order to see errors without the debeugger.
Then, in lora_app.c,
#include "i2c.h"
at the begging of the SendTxData():
The results :
Then, 5 seconds after, the RED LED blinks -> Thus, It's in Error_Handler
BUT
- if I comment this line : my_ret=HAL_I2C_Master_Transmit(&hi2c1, MS5637_ADDRESS_W, pMS5637_RESET, sizeof(pMS5637_RESET), 50); -> It's work well, I receive messages
- Instead of the action 1, if in sys_conf.h I put 1 to LOW_POWER_DISABLE and 1 also to DEBUGGER_ENABLED -> It's work well, I receive messages
Thus, I cannot see clearly the problem because each time with the debeugger it is ok but without it it's not !
Thank you for your help
