Hi,
I'm trying out a board STM32VLDISCOVERY
when I try to use the channel 2 of the uart
I get the following error:
# error "invalid DMA stream to Associated USART2
how can I disable the use of DMA or is it a bug?
Thanks a lot!
UART2 + DMA
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: UART2 + DMA
There are two drivers handling the USARTs: The Serial driver and the UART driver. The Serial driver is interrupt driven and does not require DMA, the UART driver uses DMAs.
In halconf.h you can enable and disable the various drivers, in mcuconf.h you can setup the low level detail.
In you case probably you enabled the UART driver, use the Serial instead (like in the included demo).
Giovanni
In halconf.h you can enable and disable the various drivers, in mcuconf.h you can setup the low level detail.
In you case probably you enabled the UART driver, use the Serial instead (like in the included demo).
Giovanni
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: UART2 + DMA
Hi,
Your error message was caused by a bug, that DMA channel is supposed to work with the UART driver. As I suggested before, if you don't need operations with DMA use the Serial driver and configure it to use USART2 in mcuconf.h.
Giovanni
Your error message was caused by a bug, that DMA channel is supposed to work with the UART driver. As I suggested before, if you don't need operations with DMA use the Serial driver and configure it to use USART2 in mcuconf.h.
Giovanni
Re: UART2 + DMA
Hi,
in the testhal i have only uart example!
where can i search other example with usart?
when fix the bug with DMA?
thanks of lot
Loris
in the testhal i have only uart example!
where can i search other example with usart?
when fix the bug with DMA?
thanks of lot
Loris
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: UART2 + DMA
Hi,
All examples under ./demos use the serial driver, there is a demo for the Discovery too. The bug has already been fixed in the repository, the next release will include the fix.
Giovanni
All examples under ./demos use the serial driver, there is a demo for the Discovery too. The bug has already been fixed in the repository, the next release will include the fix.
Giovanni