LoRaWAN_End_Node_FreeRTOS application on Nucleo-WL55JC2. Problem with sending more than one data packet after successful join procedure.
I'm using STM32WL V1.2.0 and trying to generate LoRaWAN End Node FreeRTOS application from .ioc file and make it work but I met some issues with sending data packets periodacally. After succescul join procedure device sends only one data packet. After Tx LmHandlerSend status is LORAMAC_HANDLER_BUSY_ERROR, MacCtx.MacState equals LORAMAC_TX_RUNNING and no more data packets are send. I think that the issue is caused by some part of FreeRTOS because I generated appliaction without it and everything works as expected but I can not find soucre of the problem. Here are steps that I made in order to generate application:
- generated project using .ioc Configuration File from LoRaWAN_EndNode_FreeRTOS example
- imported BSP driver and added it to include path
- replaced generated app_freertos.c file with app_freertos.c file from LoRaWAN_EndNode_FreeRTOS example
- inside lora_app.c file filled user code section of SendTxData function with own sending code:
static void SendTxData(void)
{
/* USER CODE BEGIN SendTxData_1 */
LmHandlerErrorStatus_t status = LORAMAC_HANDLER_ERROR;
int i = 0;
AppData.Buffer[i++] = 1;
AppData.Buffer[i++] = 2;
AppData.Buffer[i++] = 3;
AppData.Buffer[i++] = 4;
AppData.BufferSize = i;
AppData.Port = LORAWAN_USER_APP_PORT;
status = LmHandlerSend(&AppData, LmHandlerParams.IsTxConfirmed, false);
/* USER CODE END SendTxData_1 */
}Ultimately, I want to make LoRaWAN End Node FreeRTOS application work on custom board based on STM32WL55CCU6 so it's important for me to be able to generate project and make it work without issues. So here are my questions. What may be causing the issue with sending data periodically? Is there any extra steps needed in FreeRTOS configuration?