2024-12-25 09:37 PM
Hi, I'm using the LoRaWAN end node example from the stm32cubewl v1.3.0. The board im using is the RAK3172 based on the stm32wle5ccu6 chip. The application i want to build reads data from a modbus using UART and sends it through lorawan. I have assigned UART1 in the platform settings for debugging in lorawan and UART2 for reading from modbus. When I tested both separately the work perfectly. However when I integrate both together, Lorawan still works and uart 1 works properly, however uart2 stops working. I connected a USB to ttl converted to uart2 to see the if it was sending data, it sends data till Lorawan process starts running after that it doesnt send any data.
I am mostly using the code that is in STM32Cube_FW_WL_V1.3.0\Projects\NUCLEO-WL55JC\Applications\LoRaWAN\LoRaWAN_End_Node. The only changes that I have made are to write a function to read from modbus in main.c and call that function in lora_app.c just below the line EnvSensors_Read(&sensor_data);
Yet UART doesnt send any data when called from inside the sendTxData() function. Can someone please help.
I am attaching the .ioc, lora_app.c and main.c for reference