Hello
I working with MCF52259 MCU
I need to transfer string between 2 uart's - What is the MAX bauderate than the MCU capable?
What are the crystal than I need connect to MCU to get the max bauderate ?
(Can I use 48MHz and double it with the PLL and clock the uart with that clock??)
I want to use 921,600bps or higher
Many thanks,
Mayer
Also keep in mind, you only need to produce a specific baud rate if you're trying to interface to some external system that operates at a defined baud rate. I did a project recently where I had one board with two MCUs each running on a 12MHz crystal (yes, they were doing USB), and I needed to share data between them. 12MHz / 16 = 750kHz, which isn't a "typical" baud rate, but since it was just on that board between the two parts, I used 750kbps and it worked great.
What external device are you interfacing to? Does that device support 921.6kbps? If you just have two devices that will only be talking to each other in a closed system, and you can control the behavior of each device, then just figure out the fastest common bit rate that you can run them both at.
Hi
The M52259 can operate to 80MHz. To achieve this, the 48MHz input can be divided by 6 and then the PLL multiplied by 10.
The UART is clocked at the bus speed, which is half of the CPU speed (40MHz max.) and uses a 16x clock. The minimum divide value is 2, which means that the maximum baud rate that is possible is 1.25MHz.
Note 1: The baud resolution is not good at high speeds (next smallest step down would be 833.333kHz using divide by 3.
Note 2: The UARTs can be clocked alternatively from DTINn pins (at x1 or x16). This would allow fine speed adjustment assuming that the input speed can be controlled accurately. The maximum clock speed that can be applied to DTINn is with a period of 3 x tCYC which I think is about 26MHz with 80MHz PLL (tCYC seems to be the CLKOUT period but is not explicitely defined in the data sheet). There is no maximum baud specified in the data sheet for the UART itself in this mode, which suggests that up to 26MHz may be possible in x1 mode using this technique - can Freescale confirm?
Regards
Mark
Hi Mark,
Thanks for the information,
Freescale support answer :
Formulas in the section 28.4.1.2.1 (MCF52259 reference manual)
With internal clock we can reach 2.5Mbps.
With external clock we can reach 16Mbps.
Mark - Do you have a code example of the UART ?
Thanks again
Mayer
Hi Mayer
There is interrupt driver and DMA driver code in the uTasker project.
I would be interested whether 2.5M can be acheived using the uinternal clock since this contradicts the user's manual (as I have understood it) where the minimum divide value is stated as being 2.
Regards
Mark