I’m using FreeRTOS+TCP to have my embedded device communicate via UDP (I had to write a driver for my enc28j60 ethernet ic). It does DHCP and more or less works as I want it, but I could not find a way to deactivate the IP stack while I am not using it.
My device only needs network during short intervals, when sending gathered information upstream. Also, I need the SPI I use for ethernet for a different connection while I am not using ethernet. I can, of course, just let it running while I deactivate my ethernet, so that it just fails to communicate via ethernet, but I would rather not have a task running in background that interferes with the tasks I am actually needing to run.
So: is there anyway to put it to sleep? The API does not provide anything I could find. I would gladly completely de-init it and re-init it when I need it again (letting it do DHCP over again and all), but I read that you cannot do that and only use init once.