Should be empty queue always has 1 item no matter how many times receive is called

I was under a bad assumption. I was assuming that the serial message was being triggered by the WIFI chip several seconds after the call to cyw43_arch_init(); which is at the very beginning of my code. But that output is actually triggered immediately upon the first call to cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 1).

I don’t know what happens under the hood but I suspect that only the first time this function is called after the chip is init it requires a LARGE amount of stack space where subsequent calls do not.

I added a call to cyw43_arch_gpio_put at the beginning of the code before freeRTOS is set up and any tasks are created so it can use all the system stack it wants instead of the freeRTOS heap stack space.

I have no proof this is true but my problem is resolved. I want to thank everyone that took time to try and help me figure this out and gave me tips and advice.

Merry Christmas and Happy Holidays

1 Like

Glad that you figured and thank you for reporting your solution.