ESP32 Ethernet Hat Challenges

I am a bit stunned by the memory usage on ESP32. This is a 178 line test script that uses wired Ethernet and it only send an UDP message out – the program uses 645606 bytes – which is 49% of available space. Luckily it does not increase that much, so I assume this is the core libraries. I would also like to understand why a 4Mb Flash is reduced to 1310720 bytes… The answers are probably online somewhere.

A more annoying issue with ESP32 is it’s SPI support. I wrote sometimes earlier that I lack info about SPI, but I finally found some doc that states it can support up to 80Mhz on selected pins, and 40Mhz if you select your own pins – but only in Master mode and only in Full Duplex. In Half Duplex and Slave it might be reduced to something like 8Mhz due to lack of DMA support etc – bummer. This is not a showstopper, but it will force me to use reduced speed on SPI with ESP32 modules in the stack – which is a bit annoying since this is an Wifi/Ethernet adapter.

Coding on an Olimex GW board works fine – I am not able to test SPI here, so I will use a different board for that, but Ethernet works just fine so far. I must admit that ESP32 is a good match for Arduino libraries. The libraries are not as flexible as the full SDK, but it requires very few lines to get something up working. The main limitation that the libs are blocking can also be overcome by putting both CPU’s to usage.

Leave a Reply