This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HDK TMS570LS3137 BGA: SCI2 not working except in loopback mode

Other Parts Discussed in Thread: HALCOGEN

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!

  • Chuck,

    I've replied in another thread.
    The SCI2 on this device is multiplexed with N2HET1.
    You have to configure the pinmux module to select SCI2_RX and SCI2_TX.

    In loopback mode, the loop is done inside the module, so the pinmux has no effect.

  • Hi Jean-Marc,


    I have no access to my other post and I didn't receive anything via email regarding your reply to that post. When I clicked on the original link that I've received right after that post, it took a long time then said "Post Not Found". Even with after post found with a forum search, the same message remains after I clicked on the link.

    If important info is found in your other post, can you send me the link to it?

    With regards to this post on the multiplexing input, that was exactly what I was thinking before posting. However, in TRM spnu499b para. 4.3.2, it states that "Input multiplexing is not required for the 337BGA package except GIOB[2] and all the SPI signals." And those signals are solely what can be found in TRM Table 4-2.

    Of course I must have missed something since Table 2-22 of the datasheet clearly indicates that pin W3 SCIRX is multiplexed with N2HET1[6] and N2 SCITX is multiplexed with N2HET1[13]. Can you clarify my misunderstanding please?

    Thanks.

  • Chuck,

    Can you share your project including the Halcogen part so I can have a look?

  • Chuck,

    Which Halcogen version are you using in your project?

  • Jean-Marc,

    I'm using IAR EWARM IDE so I don't have the HalCoGen code. Can you compile the IAR project from your setup with the TMS570 HDK? If so please let me know where to send so I can strip down my project and give you a copy. I wish keep my project private at this time.

    Otherwise my SCI2 init code is as stated at post #1. I now use the following code to init the IOMM but still no luck.

        IOMM_KICK_REG0 = 0x83E70B13;        // enable write to IOMM registers
        IOMM_KICK_REG1 = 0x95A4F1E0;

        IOMM_PINMMR07_bit.PINMMR16 = 0;     // select SCIRX over N2HET1[6]
        IOMM_PINMMR07_bit.PINMMR17 = 1;

        IOMM_PINMMR08_bit.PINMMR0 = 0;      // select SCITX over N2HET1[13]
        IOMM_PINMMR08_bit.PINMMR1 = 1;

        IOMM_KICK_REG0 = 0x00000000;        // disable write to IOMM registers

    Here is the sequence of my code:

    1. GCLK=120 MHz, VCLK=60 MHz.
    2. Init IOMM as above.
    3. Init SCI2 as per init code of post #1. When I stepped over SCI2PIO0=0x00000006 to set SCIRX/SCITX as SCI function pins, the SCITX becomes a steady high level over ball N2.
    4. Cannot TX or RX despite the PC send data stream over to ball W3 (measured at 57600 bps signal).

    Any help would be appreciated.

    Chuck.

    EDITED: I have to remove the while() loop of post #1, it will otherwise stuck there indefinitely because IDLE always equal 1.

  • Chuck,

    I have IAR workbench so I can use your project as is.

    I'm sending a friend request so we can exchange message and files out of the public forum.