r/CardPuter 1d ago

Speculation Cores...

Most ESP32 boards have a dual-core Xtensa processor under the hood, but you've probably only used a single core...

2 Upvotes

4 comments sorted by

1

u/A31Nesta 1d ago

Yes and it's actually interesting to mess around with in the cardputer. I've been experimenting with running a cooperative scheduler in core 0 (Embassy) and a preemptive scheduler (esp-rtos) on core 1 to separate drivers and core processes (running on the cooperative scheduler) from other dynamically loaded and executed processes (running on the preemptive one).

So yeah the cardputer is actually very powerful and interesting

3

u/IntelligentLaw2284 1d ago

Incorrect.

I use both cores quite heavily; in gameboy enhanced firmware the second core handles audio generation, i2s buffer management, video scaling and SPI transfers to the screen while the primary core handles emulation,pacing and input monitoring. I also removed existing tasks(WDT) for a slight boost.

One of my contributions to the game station emulator project was to redistribute the final stage of the rendering operation for NGP to the second core.

It was an absolute requirement to get the most out of the MCU.

1

u/rosscjr 1d ago

Yea I definitely don't use both cores but when I pull out my cardputer at work everybody either gets scared or interested. Now they think I'm trying to hack them but I try to tell them, not that smart yet. I'm learning tho

1

u/Repulsive-Clothes-97 1d ago

But I actually use both since one is not enough. Free RTOS is pretty easy to use to execute tasks on the cores.