Other Parts Discussed in Thread: TMS320C6748, OMAP-L138
Hi,
I am working on a 6748, and try to use the UART2 port by using the CSL.
The best example I have found is in ti\pspiom\cslr\evmOMAPL138\examples\uart\src\uart_example.c
Unfortunately this is only demoing loopback, not using the port for real, so my first question is: Is there a better example around?
To make the code work for UART2, I assume I have to enable the port in the PINMUX, so I added the following lines to the start of device_init() in uart_example.c:
sysRegs->KICK0R = 0x83e70b13;
sysRegs->KICK1R = 0x95a4f1e0; /* To enable modifying pinmux */
sysRegs->PINMUX0 = 0x44440000; /* To enable UART0, UART1 and UART2 pins */
sysRegs->PINMUX3 = 0x22220000;
sysRegs->PINMUX4 = 0x22220000;
sysRegs->KICK0R = 0x00000000; /* To lock pinmux again */
sysRegs->KICK1R = 0x00000000;
After this, I tried to write out all PINMUX registers, and they are unchanged... What am I doing wrong?
Later in the code I removed setting the loopback flag, and I changed it to use UART2, and but the code does not work. I assume that its because the pinmux hasn't been set up correct.y.
Helge