Other Parts Discussed in Thread: CONTROLSUITE
Problem:
The UART support code in the "Mware" library does not set the correct baud rate (SCIHBAUD, SCILBAUD registers) because it uses 80MHz as the core clock in its calculation. However the clock was changed from 80MHz to 90MHz in C:\ti\controlSUITE\device_support\f2806x\v136\F2806x_common\include\F2806x_Examples.h
#define DSP28_PLLCR 18 // Uncomment for 90 MHz devices [90 MHz = (10MHz * 18)/2]
The MWare header file defines the core clock frequency, for use in peripheral clock calculations:
C:\ti\controlSUITE\device_support\f2806x\v136\MWare\driverlib\sysctl.h
#define SYSTEM_CLOCK_SPEED 80000000
This complementary c file returns the clock speed:
C:\ti\controlSUITE\device_support\f2806x\v136\MWare\driverlib\sysctl.c
unsigned long SysCtlClockGet(void)
{
return SYSTEM_CLOCK_SPEED;
}
This function calculates the baud rate register values based on the system clock, and it assumes the clock was divided by 4 (another bug prone assumption)
C:\ti\controlSUITE\device_support\f2806x\v136\MWare\driverlib\uart.c
UARTConfigSetExpClk(g_ulBase, SysCtlClockGet()/4, ulBaud, (UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE | UART_CONFIG_WLEN_8));
Solution:
One of these two will fix the problem:
1)
Change DSP28_PLLCR back to 16 in F2806x_Examples.h,
2)
Change SYSTEM_CLOCK_SPEED to 90000000 in sysctl.h, clean project, then build all