2016-04-21 12:26 AM
Hi all:
On an STM32F407 with the Standard Peripheral Library 1.5.0, I tried to configure USART6 to the documented maximum of 10.5 Mbit/s, and I got an assert in USART_Init(). The problem is here: #define IS_USART_BAUDRATE(BAUDRATE) (((BAUDRATE) > 0) && ((BAUDRATE) < 7500001)) That definition allows a value up to 7.5 Mbit/s. Is that a bug in the library? I just checked, and the Standard Peripheral Library 1.6.1 has the same values in IS_USART_BAUDRATE(). Thanks in advance, rdiez2016-04-21 07:11 AM
Hi diez.r,
The issue is reported internally to be fixed in coming versions of STM32F4 Standard Peripheral Library.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2016-04-21 09:43 AM
These rates seem unreasonably high for an asynchronous link, perhaps you can consider better alternatives?
2016-04-22 04:36 AM
> These rates seem unreasonably high for an asynchronous
> link, perhaps you can consider better alternatives? I wanted a synchronous link (with clock signal). I ran out of SPIs, so I am using USART6 as a replacement, even though I will be losing some performance (for each 8 data bits, the additional start and stop bits are wasted because they do not trigger the clock signal, if I understood the documentation correctly). You call the same function USART_Init() in order to initialise the USART in synchronous mode, right? Regards, rdiez2016-04-22 11:07 AM
That and USART_ClockInit()
2016-04-22 11:09 AM
Different family, but might be instructional
STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\USART\Synchronous\main.c