Thank leroyle for your replay, i start the code again from scratch but I’ve a question about using the Yield Fn. , if I Yield the LoRaWAN Task during the joining state, isn’t that would affect the joining process & may cause it to fail as the CPU now is shifted to another Task?
Now I’m actually facing a different Error
joining…
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:1446 (xQueueGenericReceive)- assert failed!
abort() was called at PC 0x40086877 on core 1
as I’m trying to synchronize between tasks using the eventGroup my Tasks are as follow:
void Sensor_Task(void *Arg)
{
while(true)
{
xEventGroupWaitBits(EvtGroup,
Sensors_Bit,
false, // Don’t Clear on Exit
true, // Wait for All Bits
portMAX_DELAY);
Serial.println("This is Sensr Task..");
RTOS_mSDelay(3000);
xEventGroupClearBits(EvtGroup, Sensors_Bit);
}
}
void LoRaWAN_Task(void *Arg)
{
while (true)
{
xEventGroupWaitBits(EvtGroup,
LoRaWAN_Bit,
false, // Don’t Clear on Exit
true, // Wait for All Bits
portMAX_DELAY);
LoRaWAN_Cycle();
}
}
just as soon as I comment the EventGroup lines from the code, the error goes away!!
the Error happens during the joining process also.