Hi there,
I found out that I had set the refresh rate of the MLX90640 incorrectly. This was a bug caused by my carelessness.
When I changed the refresh rate from 16Hz to 32Hz, everything worked as expected (the MLX90640 outputs one image by combining two samples, so the actual frame rate is halved).
The results were as follows:
| ProcessInput() [ms] | ProcessOutput() [ms] | Frame rate [Hz] | |
|---|---|---|---|
| Single-core sequential processing | 74 | 52 | 7.9 |
| Multi-cores parallel processing | 64 | 52 | 15.6 |
Also, I made a mistake in my previous post, so I've completely revised it.
The ESP32S3 CPU access SPI and I2C via the APB. As a result, I think that the contention on the APB was not a problem.
I'll add some more information.
Current consumption
- MLX90640
- less than 23mA (source: https://www.melexis.com/en/documents/documentation/datasheets/datasheet-mlx90640)
- 2.4" SPI LCD module
- About 90mA (source: 2.4inch SPI Module ILI9341 SKU:MSP2402 - LCD wiki)
- XIAO ESP32S3
- BAT: 3.8V@22mA (source: Getting Started with Seeed Studio XIAO ESP32S3 Series | Seeed Studio Wiki)
- Buck converter (SGM6029) on XIAO
- 3.3V Imax 600mA (source: SGM6029 data sheet and product information - SGMICRO)
ESP32S3 I2C clock
The S3 data sheet says up to 800KHz.
When I set the I2C clock to 1MHz, and then read the set value, 1MHz will be returned.
// I2C bus clock for MLX90640
// Note: ESP32S3 supports up to 800 MHz
Wire.setClock(1000000); // 400 KHz (Sm) or 1 MHz (Fm+)
// Serial.println(Wire.getClock()); // 1000000
However, I actually measured it with an oscilloscope and found it to be 800KHz.
I'd add this post as it might be useful to someone.
Thank you.

