News for hackers. Stuff that matters.
Re:SSD1306 display drivers and font rendering by grmnygrmny2 on Monday April 14, 2025 @02:01PM (#43684255)
(author here) I've been pondering this, yeah. I'm currently sharing the I2C bus with a DAC and that's working alright, but the refresh rate issue is enough to make me consider SPI. I know the SPI peripheral supports DMA as well, and the I2C one doesn't (sort of? I know there's "async" transmit now but can't tell if that's really doing DMA)
Re:SSD1306 display drivers and font rendering by arghwhat on Monday April 14, 2025 @03:26PM (#43685194)
The I2C peripheral is DMA - a write just queues an operation descriptor in a hardware FIFO, and interrupts fire whenever something exciting happens or the FIFO is drained. The synchronous implementation is just blocking on a condition set by the interrupt handler.

But this is exactly the kind of thing the SPI peripheral is meant for. This cannot be said for the I2C peripheral, with its measly fast mode support.

Depending on the chip and your usecase, you might also want to use I2S for your DAC.

Re:SSD1306 display drivers and font rendering by grmnygrmny2 on Monday April 14, 2025 @04:26PM (#43685944)
Ah! That makes sense, thanks!

And yes, the audio data runs over I2S - the chip I’m using just uses I2C for control.