Skip to content
Discussion options

You must be logged in to vote

I recommend modifying the I2S class to make it full duplex. I think that will be easier than trying to synchronize the DMA channels between independent I2S instances. Here are some implementation ideas:

  • change the single SD pin to two pins, SDIN, SDOUT
  • add a new mode to support full duplex, such as RXTX
  • create two application buffers, one for TX, one for RX. The split would be internal to the class. No need to expose this implementation detail to the user API.
  • create two DMA buffers, one for TX, one for RX
  • keep the 2 chained DMA channels, but now the DMA interrupt both feeds and empties the DMA buffers
  • modify the PIO code so that it handles full duplex.

For the master clock you might al…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@hexagon5un
Comment options

@miketeachman
Comment options

@hexagon5un
Comment options

Answer selected by hexagon5un
Comment options

You must be logged in to vote
1 reply
@hexagon5un
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants