Searched for tag ESP32 and found 2 results in 0.5 ms

Arduino: ESP32-S2 USB modes

I picked up some new ESP32-S2 boards to play around with. These newer boards come with native USB on board, instead of a separate USB to serial chip to handle communications. With this new chip, there are some new USB acronyms in the Arduino menus. I kept getting them confused so I looked them all up and am committing them here for future reference.

Mode Explanation
USB DFU Device Firmware Upgrade: Upload mode
USB CDC Communication and Data Control: UART/Serial mode
USB MSC Mass storage device class
USB HID Human Interface Device: Mouse/Keyboard emulation
Tags:
Leave A Reply

Comparing 32bit and 64bit performance on low end micro-controllers

Testing 32bit vs 64bit PRNGs on a 32bit ESP32-C3 I'm seeing:

32bit

PRNG Iterations Output bits Bytes per second
xoroshiro64** 509038 32 2036152.0
pcg32 487697 32 1950788.0

64bit

PRNG Iterations Output bits Bytes per second
xoshiro256+ 487696 64 3901568.0
xoshiro512++ 441630 64 3533040.0
splitmix64 464875 64 3719000.0
pcg64 529955 64 4239640.0
biski64 484715 64 3877720.0

Very little difference on PRNGs that use 64bit operations vs 32bit operations. Even on limited hardware like this it makes sense to use a 64bit PRNG because you get more bytes per cycle.

Tags:
Leave A Reply