2012-11-04 11:21 PM
Hello Friends,
Am trying to achieve a high baud rate using USART1 - 7.3728Mbps SYSCLK=168MHz APB2=84MHz Now to achieve this baud rate, I need the OVER8=1 (3 bits for Fraction) Using example code, I set the OVER8 by following piece of code: USART_OverSampling8Cmd(USART1, ENABLE); But it seems this piece of code has no affect. I tried using the Register>>USART1>>CR1 but unable to find any OVER8 ? Am using IAR Kickstart edition 6.4 (Free license, but, limited to 32kb code size) I believe that STM32F407 family should support the OVER8? Would really appreciate, if someone could take time and assist me? Thanks in advance, Best Regards #usart2012-11-05 12:33 AM
Quote from stm32f4xx_usart.c:
* In order to reach higher communication baudrates, it is possible to
* enable the oversampling by 8 mode using the function USART_OverSampling8Cmd(). * This function should be called after enabling the USART clock (RCC_APBxPeriphClockCmd()) * and before calling the function USART_Init(). JW2012-11-05 04:08 AM
Well, I think your bigger problem here will be getting the baud rate you actually want.
The settings are likely to result in a rate of 7.6363 Mbps (+3.57%), running at 162 MHz might get you to 7.3636 Mbps (-0.12%). To get closer to the rate you want you'll want to clock from a more suitable crystal, and choose optimal PLL settings.2012-11-05 04:34 AM
... and your next problem will be to get such a high-bandwidth signal through your level-shifter hardware and cable. I wouln't be surprised if you have transmission errors in the 2-digits percent range.
2012-11-06 06:56 AM
Over a short distance either RS-485, LVDS or a high speed optocoupler can easily handle an 8MHz data rate. Won't work for RS-232 though.
At that high a data rate you will need to use DMA for transfers; the per character total interrupt service latency would have to be around 1usec, and even then you won't have any CPU time left. Is the baud rate not changing? What value are you putting in the BRR? Jack Peacock2012-11-06 07:44 AM
Well hopefully the OP has some grasp of the data stream in question given the specificity of the baud rate required.
Then again it sounds like a downstream GSM HSDPA rate, which is more of a modem over air number rather than the speed you'd want to talk to the modem, using buffering and flow control. And yes, you'd definitely want to use DMA if you want to come close to saturating the channel, and perhaps consider synchronous mode.