Re: ESP32-S3 SPI slave clock only stable on GPIO43
Posted: Thu Mar 26, 2026 7:53 pm
I tested, the interrupts are not the problem. When I provide my own CS with the generator it still has the same issues with the SPI peripheral counting one clock too many, sometimes.
Reducing the interrupts is a nice improvement indeed. It was on my list but low prio, since it does not seem to hurt anything in practice. Some units have different timings so the timer value should be representative. Instead I was thinking of using the RMT as clock idle detector.
I added that in an RMT variant of the signal tester. The interesting thing is: the RMT does count 264 pulses consistently on either pin 43 or 21. At the same time, the SPI peripheral does count 265 regularly when 21 is used. I'm switching with esp_rom_gpio_connect_in_signal. So it must be some GPIO specific configuration but as far as I see it is the same. Or the extra clock pulse is quicker than the RMT's 10 MHz.
Reducing the interrupts is a nice improvement indeed. It was on my list but low prio, since it does not seem to hurt anything in practice. Some units have different timings so the timer value should be representative. Instead I was thinking of using the RMT as clock idle detector.
I added that in an RMT variant of the signal tester. The interesting thing is: the RMT does count 264 pulses consistently on either pin 43 or 21. At the same time, the SPI peripheral does count 265 regularly when 21 is used. I'm switching with esp_rom_gpio_connect_in_signal. So it must be some GPIO specific configuration but as far as I see it is the same. Or the extra clock pulse is quicker than the RMT's 10 MHz.