Skip to content

Conversation

@NoahVickerson
Copy link

Converted the UART Driver to using DMA. Includes the following changes:

  • ReceiveIT is changed to Receive. It now reads from a rx buffer and writes to a passed-in character buffer. To call, pass in the character buffer to be written to along with an index, and continually call the Receive until it returns true.

  • Transmit. Now configures a message and starts a DMA transmission to the peripheral. One potential error here could be hal not leaving the busy state, but ignoring this works as a fix for now (confirmed on stm32 forums). Messages are formatted to be terminated with '\r\n' and the Receive function will assume this.

  • No longer requires interrupt handlers (from my understanding) because of the nature of the DMA

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