Re: Serial connection is garbled at 32MHz
Allon Stern <[email protected]> Thu, 3 Apr 2008 15:23:51 -0400
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers.coldfire |
|---|---|
| Message-ID | <[email protected]> |
On Apr 3, 2008, at 2:20 PM, Loren A. Linden Levy wrote: > Hi Guys, > > So I am making progress with this external FPGA (thanks to all the > help) and I have the code basically working (I think). One thing we > are doing is artificially running the chip (M%282) at 32MHz and this > screws up the display over serial (I get nonsense characters). This is > not too big a deal b/c I can connect just fine over telnet I was just > wondering if there was an obvious way to fix it (settings?). Thanks > again. I'd suggest looking at (assuming 2.6) linux2.6.x/drivers/serial/ mcfserial.c Look for the line (#636 in my kernel): /* compute the baudrate clock */ This is where it determines the baudrate clock based on the CPU clock. It appears to be based off of MCF_BUSCLK, which is defined in linux2.6.x./include/asm-m68knommu/coldfire.h as #define MCF_BUSCLK (CONFIG_CLOCK_FREQ / CONFIG_CLOCK_DIV) Both CONFIG_CLOCK_FREQ and CONFIG_CLOCK_DIV are defined in your .config. If you're changing the clock on the fly, then you need to figure out what to change in the UART registers. Enjoy! - allon --- [email protected] Send a post to the list. [email protected] Join the list. [email protected] Join the list in digest mode. [email protected] Leave the list.