Page 1 of 1

ESP32 - SPI BUS, long time between transitions

Posted: Sun Apr 10, 2022 3:57 pm
by MaurizioAndaloro19
Hello everyone,

I'm trying to make a project that has three sinusoids out of phase by 120 degrees at the output.
The sinuosoids are generated by three MCP4921 DACs driven by an ESP32.
I anticipate that I would like not to use PWM.
The three sinusoids must be in phase with respect to an input sinusoid from which I detect the zero crossing.

Using the library https://github.com/espressif/arduino-es ... /src/SPI.h I am able to generate the sinusoids without too many problems with a good sample rate but with some instability, I don't always get a precise frequency. Sometimes yes, sometimes no ... it depends on the frequency.

But before discussing my project, I noticed instead that using the original ESP API I get more frequency stability at the expense of a lower sample rate due to the 8us between transitions.

I bought an ESP32-S3 as I have read that its hardware is capable of transmitting "Segmented Transitions".

There are two current questions:

1. How can I decrease the time between transitions using an esp32? Using Interrupts? But how? I haven't found anything online to guide me.

2. While waiting for the new ESP32-S3 to arrive, I would like to inquire about "Segmented Transitions", but again I haven't found much.

Thanks in advance.