Hello,
I've been diving into the world of Microprocessors these couple of months and been reading a bit of literature to try and get up to speed to work in a school project. To start working in any project related to UART I've noticed that the selection of the correct Clock frequency, in order to get the best baud rate possible (if possible perfectly calculated) is really important to avoid errors in the transmit and receiving of data. The LM4F120H5QR has the possibility to divide into a variety of possible clock frequencies since it has the PLL at 400MHz, a 16MHz oscillator and the hibernation clock. These clocks can be chosen and then divided into a integer value from 3 to 128, given the SYSDIV bits in the RCC and RCC2 register, and the obligated HES bit (8 or 16 integer) that further divides this clock. This clock is then divided using the the auto-baud generator allows us to choose a baud rate dividing the clock chosen by an integer in the range of 2^16 bits with a fractional part of 6 bits. After ALOT of number crunching I was able to retrieve baud rate of 115207.373 which was the closest to 115200 (which is my target baud-rate because I want to transfer data from pictures I'm capturing at the fastest rate possible). This gives me a max error rate of 0.06% (see link below). Now a couple questions pop into my mind after all this, if all my components can reach 115200 baud rate, would i have trouble with my micro baud rate being over by 7 (115200->115207.373), and is there actually not a clock frequency that I can successfully divide exactly into a common baud-rate using the Stellaris?
P.S for the number crunching I used 400MHz (Only taking into consideration the max of 80MHz), 200MHz(Max of 80MHz), and 16MHz. The successful clock frequency was 3571428.571 or 3571428.571*2.
http://mspgcc.sourceforge.net/cgi-bin/msp-uart.pl?clock=3571428.571&baud=115200&submit=calculate
As well, I check all the possible pins and their optional peripherals that I can choose from. None had a possibility of adding an external clock. Possible way to solve this? Or I have to make due with the ones already on the board.
Thanks! Will be waiting to answer any type of misunderstanding.