audiocore-i2s-driver #3
Reference in New Issue
Block a user
Delete Branch "audiocore-i2s-driver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
3c3ac33e36to170861f9e9954c85d5d2to872b3f1a61872b3f1a61to51f2b8922fWIP: audiocore-i2s-driverto audiocore-i2s-driverc2074e136atoee5ea90e0aaudiocore-i2s-driverto WIP: audiocore-i2s-driverWIP: audiocore-i2s-driverto audiocore-i2s-driverbool i2s_init(int out_pin, int sideset_base, int samplerate)Is it clear to the user that setting
sideset_basemeans initializing gpiosideset_baseandsideset_base+1?We should also note somewhere that our assumption is that already an underfull DMA transfer is counted as an underrun (i2s.c, l. 33ff.). I am thinking ahead a bit and assume that we will write a bit of technical documentation at some point :)
Question regarding
void dma_isr(void):Currently we
dma_channel_acknowledge_irq1the interrupt first, then callspin_lock_blocking(), which disables interrupts.Is this safe? Or in other words: are we sure we don't use nested interrupts? Imho we should disable interrupts first, then acknowledge the source.
The rp2040 datasheet ch. 2.3.2 states that the NVIC supports interrupt nesting, but it doesn't say anything about en- or disabling nesting. Neither does the sdk docu.
Not directly, but documented for the external (python) API in module.c:93.
In the future this buffer will not be filled by the python user, but by the MP3 decoder which makes it less public.
As I understand it, only interrupts with different priorities nest (a higher priority IRQ can interrupt a lower priority handler). By default all interrupts are the same priority, so interrupt nesting should not play a role if not explicitly activated. And I don't know if it is needed in this project.