01-14-2010 04:09 PM
Read my previous post: http://forums.ni.com/ni/board/message?board.id=420&thread.id=1996
I am having problems again, I have corrupted sent data throught serial port 0 when using the NI serial driver on the LM3S811. I also get error code -1073807339 when reading that data, inside labview with VISA, sent from my ARM to my PC.
I am thinking that the timings might be wrong, but I don t know where to look for baud-rate divisor for UART0. The 3S811 is Xtal 6Mhz, not 8Mhz like the 3S8962.
I also tested the PWM on a scope and the frequency dosen t match, if I ask for 1kHz I get around 666Hz. Seems like setting the Xtal to 6Mhz in uVision is not enought.
thx
Lukasz
Solved! Go to Solution.
01-15-2010 01:54 PM
Hi Lukasz,
My collegue will be posting to your other post shortly.
01-18-2010 01:36 PM
Ok, here is the solution.
Open "startup.s"
Goto line 193:
; set the system clock to run at 50 MHz
; SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL |
; SYSCTL_XTAL_8MHZ | SYSCTL_OSC_MAIN);
LDR R0, =0x01C002C0
BL SysCtlClockSet
B __main
Replace R0, with the right values found in "sysctl.h" line 236:
in my case set the crystal to 6Mhz which is "0x000002C0"
PWM timing is restored and serial port works fine now.