Skip to content

Add support for 16-bit SPI transfers via DMA#18

Merged
mvertescher merged 5 commits into
stm32-rs:masterfrom
braun-embedded:dma-16
Jul 14, 2019
Merged

Add support for 16-bit SPI transfers via DMA#18
mvertescher merged 5 commits into
stm32-rs:masterfrom
braun-embedded:dma-16

Conversation

@hannobraun

Copy link
Copy Markdown
Contributor

This pull contains the following changes:

  • Fix the 16-bit SPI mode. My last pull request contained a mistake.
  • Make DMA generic over word size, add 16-bit support.
  • Add support for 16-bit DMA transfers to SPI module.

There was a configuration error in the SPI module that caused 16-bit
mode to not work correctly. The 16-bit words were basically treated as
two bytes. This was indicated by the fact that I had to convert the word
in the example to big endian to get the right result.

When I first discovered that this conversion was necessary, I was
suprised, but eventually convinced myself that this was normal. Well, it
isn't, and the way it works now makes a lot more sense.

@mvertescher mvertescher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid change, thanks for the example!

@mvertescher mvertescher merged commit eb7ddb1 into stm32-rs:master Jul 14, 2019
@hannobraun hannobraun deleted the dma-16 branch July 16, 2019 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants