This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Streaming direct from SPI to I2S - nrf52

I'm using the nrf52832 and I need to stream audio from an SPI connected memory chip, to an I2S connected amplifier. Is there a way I can have the SPI device stream data directly to the I2S device, without having to manually double buffer it?

Parents Reply
  • Hi,

    I suppose you can use PPI and hook the I2S->EVENTS_TXPTRUPD event to the SPIM->TASKS_START task. For what it is worth you can also do it the other way around; hook the SPIM->EVENTS_ENDRX event to the I2S->TASKS_START task.

    It is also possible to read data from SPI and and transmit data on I2S concurrently. Please refer to the EasyDMA documentation.

    But no matter how you do it you will have to update the pointers to the RAM buffers using interrupts. I.e. you can't read data from SPI and transmit them to I2S autonomously for all eternity without bothering the CPU every once in a while, but you can substantially offload the CPU with EasyDMA.

Children
No Data
Related