Re: Serial connection is garbled at 32MHz
Greg Ungerer <[email protected]> Fri, 04 Apr 2008 11:06:59 +1000
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers.coldfire |
|---|---|
| Message-ID | <[email protected]> |
Hi Allon, Loren, Allon Stern wrote: > On Apr 3, 2008, at 2:20 PM, Loren A. Linden Levy wrote: >> 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. That is right. If you are just feeding a different master clock to the 5282 then the right change to make is to CONFIG_CLOCK_FREQ. Look for the config menu item with the text "Set the core clock frequency". This is only in 2.6.x kernels. If using a 2.4.x kernel then you need to change the clock frequency manually in the source (look in linux-2.4.x/include/asm-arm/coldfire.h). Regards Greg ------------------------------------------------------------------------ Greg Ungerer -- Chief Software Dude EMAIL: [email protected] Secure Computing Corporation PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com --- [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.