2019-07-01 09:48 AM
I'm using stm32cubeIDE and I got nothing more than the STM32CubeExpansion_LRWAN_V1.2.1's libraries (stm32l0xx_hal_i2c) to help me. I'm on the i2c1 interface on PB8 and PB9 ports. I think the problem is that I don't know how the flags works.
2019-07-01 10:06 AM
Can you actually read the sensor via I2C currently?
Which LRWAN example are you using as a basis for this project?
onRxTimeout can simply mean nothing was heard on the radio during the timeout period, ie 1 second, or whatever.
Something on the network would need to be transmitting message(s) with the same radio settings for this node to be able to hear it.
2019-07-02 01:20 AM
Thank you for your quick response.
With an arduino code I was reading the sensor clearly. Now I'm using the ping pong example.
I tried to see with an oscilloscope if something was transmited on the I2C ports but the signal didn't move.
Here are the part of my code coresponding to the I2C communication :
#define MCP9808_I2CADDR_DEFAULT 0x18 //I2C addr sensor
uint32_t TimeoutI2c = 100;
...
HAL_I2C_IsDeviceReady(&hi2c1, MCP9808_I2CADDR_DEFAULT, 5, TimeoutI2c);
PRINTF("Ok \n\r");
Thank you for helping me.
2019-07-02 03:05 AM
Hi !
I just tried with HAL_I2C_Master-Transmit-IT() and HAL_I2C_Master-Receive-IT(). I don't get error but I'm not sure of how these functions works. I will try to understand. I think that the solution is in the MCP9808's datasheet.
Thank you again for helping me !
2019-07-03 06:01 AM
Hi !
In fact HAL_I2C_Master-Transmit-IT() don't work. It just let the code go on even if it does nothing.
I'm new with this kind of work. Is someone know if I'm missing something obvious ?
2019-07-08 01:24 AM
Hi everyone !
Just to say that it works with a project correctly configurate with cube mx. I think that the problem comes from the example config wich doesn't match what I need. If someone knows how to put a .ioc config file in the example project it will help me a lot.
Thanks all