I have a TI Piccolo that I'm trying to set up for serial communication. With my stronger DSP (F28335) I'm able to set up PLL the following way:
void PLL_Init()
{
// PLL to set CLK to 60 MHZ
SysCtrlRegs.PLLSTS.bit.DIVSEL = 0;
SysCtrlRegs.PLLCR.bit.DIV = 0xA;
SysCtrlRegs.PLLSTS.bit.DIVSEL = 2;
SysCtrlRegs.LOSPCP.all = 0x0;
}
This way I know that the speed when I divide it down to make the low speed clock. So for example when I set my baud rate fr the SCI I can divide 75MHz by 2 and then use the formula in the datasheet to get BRR. This doesn't seem to work on the piccolo though.. I change to code to reflect the piccolo's clock (60MHz max) and do the same process and I can't seem to receive anything on the SCIRXBUF register and this is only on the Piccolo. I would like to know if someone could tell me what is the minimum clock speed on the piccolo. Meaning, if i dont enable PLL, would the clock speed be 15 MHz? since the default is said to be OSCCLK/4. I'm a little confused about this. This is how I'm setting up the SCI registers:
void sci_init()
{
SysCtrlRegs.LOSPCP.bit.LSPCLK = 0; // low speed clock = SYSCLK/1
SysCtrlRegs.PCLKCR0.bit.SCIAENCLK = 1;
// SCI A for receiving stop command
SciaRegs.SCICCR.all = 0x7; // 8 bits, idle line mode on, no parity
SciaRegs.SCILBAUD = 0x30; // 48 for baud rate value of 38400
SciaRegs.SCIHBAUD = 0x0;
SciaRegs.SCICTL1.all = 0x23;
GpioCtrlRegs.GPAMUX2.all = 0x5000000; // set RX/TX for the UART chip GPIO29:28
}