Friday, 21 August 2015

STM32 UART: combining interrupt and DMA modes


I am trying to use UART3 of STM32F103K8 to rx data in interrupt mode and tx in DMA mode. Reception works well, but transmission has a bug: first portion of data is transmitted just fine and ISR is called. After that, huart.gState == HAL_UART_STATE_READY is never achieved and any subsequent transmission fails.


So, the questions are:




  1. Is it OK to use interrupt mode rx and DMA mode tx for single UART? Are there any examples?

  2. Given that all DMA channels have same preemption priority and are used havily and simultaniously, can it potentially result in data loss, IRQ conflicts or have other negative consequenses?




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...