Page 1 of 2
[TODO] Interrupt-driven UART Driver for STM32F05x
Posted: Mon Mar 04, 2013 7:22 pm
by steved
I'm using both serial ports in UART mode on the 32F051, plus one or both I2C ports - so not enough DMA controllers to go round.
I'm only using serial at 9600 baud, so added a compile-time option to the UART driver so that it could be interrupt-driven rather than use DMA.
Use the attached to replace the standard STM32/UARTv2 files, and for interrupt-driven handlers add in mcuconf.h:
#define STM32_UART_USE_INTERRUPTS TRUE
(if not defined, the driver defaults to DMA for BC)
Re: Interrupt-driven UART Driver for STM32F05x
Posted: Mon Mar 04, 2013 7:46 pm
by goeck
uh...nice. Please add this to trunk. I'm not able to test it extensively though now ...
Also I'd like to have that option for I2C and SPI...this is the usual case on AVR, where no DMA is present.
Cheers
Stefan
Re: [TODO] Interrupt-driven UART Driver for STM32F05x
Posted: Wed May 28, 2014 10:24 am
by steved
Updated version for 3.x attached
Re: [TODO] Interrupt-driven UART Driver for STM32F05x
Posted: Thu May 29, 2014 8:24 pm
by colin
Thanks steved, I am glad to see this. I hope to see, or possibly write myself, interrupt-driven options for SPI and I2C on the STM32F0 as well, since I want to use two SPI and two I2C concurrently for a project.
Re: [TODO] Interrupt-driven UART Driver for STM32F05x
Posted: Thu May 29, 2014 8:26 pm
by colin
Re: [TODO] Interrupt-driven UART Driver for STM32F05x
Posted: Sat May 31, 2014 9:52 pm
by steved
Unfortunately looks like that one is for the STM32F1, unless I've missed something. (I'd noted it as a possible basis for a 32F0 version).
I did start on an interrupt-driven I2C driver, without total success; some of what I was trying to achieve is covered in
this thread
Re: [TODO] Interrupt-driven UART Driver for STM32F05x
Posted: Tue Jun 03, 2014 6:30 am
by DeusExMachina
steved wrote:I'm using both serial ports in UART mode on the 32F051, plus one or both I2C ports - so not enough DMA controllers to go round.
I'm only using serial at 9600 baud, so added a compile-time option to the UART driver so that it could be interrupt-driven rather than use DMA.
Use the attached to replace the standard STM32/UARTv2 files, and for interrupt-driven handlers add in mcuconf.h:
#define STM32_UART_USE_INTERRUPTS TRUE
(if not defined, the driver defaults to DMA for BC)
Great job! I used it and it works as expected. Thank you.
Re: [TODO] Interrupt-driven UART Driver for STM32F05x
Posted: Fri Jun 06, 2014 2:59 pm
by mobyfab
Why don't you use the serial driver which uses interrupts?
Re: [TODO] Interrupt-driven UART Driver for STM32F05x
Posted: Wed Jun 18, 2014 5:40 am
by DeusExMachina
I have a byte-oriented protocol, so it's easier to manipulate the input data using UART driver.
Re: [TODO] Interrupt-driven UART Driver for STM32F05x
Posted: Wed Jul 02, 2014 1:50 pm
by steved
Driver also now tested on the 32F302.