Hi there,
I've tried to post in an existing thread but didn't work ... "Page not found" error after clicking on the link of the post auto-confirmation email. So let's put on a new thread.
I'm working with the TMS570 HDK and the LS3137 MCU, with VCLK configured to use 60 MHz. For some reason the while() loop of the following code never ends.
If I omit the while() loop, then the IDLE bit is permanently set and I can't TX nor RX. I suspect that this is improper configuration of input buffer and output buffer because I'm able to receive TX data if LOOPBACK is set to 1. When typing characters in the connected VT100 terminal, the signal is correctly routed up to BGA pin W3 (SCIRX). But when it transmit, despite the MCU is capable of trigger the TX INT, nothing is output to BGA pin N2 (SCITX).
Please help.
void tagRs232::Init()
{
SCI2GCR0 = 0x00000001; // bring SCI2 out of reset to configure SCI registers
SCI2GCR1 = 0x03020022; // TX/RX enabled, continue, ready, internal SCICLK, asynchronous timing mode, 1 stop bit, non parity
SCI2SETINT = 0x00000300; // enable TX/RX interrupts
SCI2FORMAT = 0x00000007; // SCI mode character length is 8 bits
SCI2BRS = 0x00000040; // baudrate is 57600 bps
SCI2PIO0 = 0x00000006; // SCIRX and SCITX as SCI function pins
SCI2GCR1 = 0x030200A2; // set SW_nRST=1 to enable SCI
while ((SCI2FLR & 0x4) == 0x4) // wait for the IDLE bit to be cleared
continue;
}
After configuration, I have the following registers contents (note that IDLE=1):
Thanks!
