Hi,
On the TMS320C6424 EVM I'm using UART0 for simple serial comms. The peripheral works fine if the board is started with the ROM bootloader enabled. However, if I do a direct boot (BOOTMODE[3:0] = 0100b & FASTBOOT = 0, or BOOTMODE[3:0] = = 1001b & FASTBOOT == 1) the UART spits out garbage. It seems like the ROM bootloader is doing something my code isn't? I verified the AUX_CLK is running from the PLL and the PSC has the peripheral powered up with the clock enabled before the code below is executed. The ROM bootloader version is 0x00010400. Any thoughts would be appreciated.
uart0 initialization code:
CSL_UartRegsOvly uartOvly = (CSL_UartRegsOvly)CSL_UART_0_REGS;
Uint32 divisor = 27000000 / ( baudrate * 16 );
uartOvly->PWREMU_MGMT = 0; // Reset UART TX & RX components
_wait( 100 );
/* Set the baud rate */
CSL_FINS(uartOvly->DLL, UART_DLL_DLL, divisor);
CSL_FINS(uartOvly->DLH, UART_DLH_DLH, (divisor >> 8) );
/* Enable FIFO mode */
CSL_FINST(uartOvly->FCR, UART_FCR_FIFOEN, DISABLE);
CSL_FINST(uartOvly->FCR, UART_FCR_FIFOEN, ENABLE);
/* Clear Rx and Tx FIFOs */
CSL_FINST(uartOvly->FCR, UART_FCR_RXCLR, CLR);
CSL_FINST(uartOvly->FCR, UART_FCR_TXCLR, CLR);
/* DMA mode disabled */
CSL_FINST(uartOvly->FCR, UART_FCR_DMAMODE1, DISABLE);
/* Set the trigger level to 4 chars */
CSL_FINST(uartOvly->FCR, UART_FCR_RXFIFTL, CHAR4);
/* Enable Receiver data available interrupt and character timeout indication */
CSL_FINST(uartOvly->IER, UART_IER_ERBI, ENABLE);
/* Enable Receiver line status interrupt */
CSL_FINST(uartOvly->IER, UART_IER_ELSI, ENABLE);
/* Disable transmitter holding register empty interrupt */
CSL_FINST(uartOvly->IER, UART_IER_ETBEI, DISABLE);
/* Break control disabled */
CSL_FINST(uartOvly->LCR, UART_LCR_BC, DISABLE);
/* Stick Parity disabled */
CSL_FINST(uartOvly->LCR, UART_LCR_SP, DISABLE);
/* Parity is disabled */
CSL_FINST(uartOvly->LCR, UART_LCR_PEN, DISABLE);
/* 1 stop bit */
CSL_FINST(uartOvly->LCR, UART_LCR_STB, 1BIT);
/* Autoflow control disabled */
CSL_FINST(uartOvly->MCR, UART_MCR_AFE, DISABLE);
/* Loop back disabled */
CSL_FINST(uartOvly->MCR, UART_MCR_LOOP, DISABLE);
/* Tx on */
CSL_FINST(uartOvly->PWREMU_MGMT, UART_PWREMU_MGMT_UTRST, ENABLE);
/* Rx on */
CSL_FINST(uartOvly->PWREMU_MGMT, UART_PWREMU_MGMT_URRST, ENABLE);
/* Emulation Stop */
CSL_FINST(uartOvly->PWREMU_MGMT, UART_PWREMU_MGMT_FREE, RUN);