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.

C6747 UART Works in Loopback but doesn't output to DB9 Connector on EVM Board

Other Parts Discussed in Thread: TMS320C6747, OMAP-L137

I'm working with the OMAP-L137/TMS320C6747 Floating-Point Starter Kit and have written a driver for the UART's using the EDMA controller.  I have things working with the UART in Loopback mode.  Turning on UTRST in the PWREMU_MGMT register triggers the EDMA controller and the message is transmitted.  It is also received and processed by the EDMA controller.  Unfortunately, when I do the same thing with Loopback mode turned off, I don't see any signalling on the EVM board's DB9 UART connector looking at it with a scope.  I'm sending the data to UART2.

Any help or pointers would be appreciated.

Mike

  • You have easily done the biggest amount of the task already, by demonstrating EDMA activity handling the events for the UART. I will assume that your "message" is more than a single byte so that your EDMA programmation is waiting for the hardware signaling from the UART to pace out its writes and reads.

    My guess is that there is something configured wrong for the pins so that they are either not enabled or muxed correctly to get the signaling that you want from the UART.

    You may have tried this already, but I would certainly recommend working from DSP code to do the writes to the UART just to see if you can get the pins working right. In fact, you could just go to the UART registers in CCS and write to them manually to see if you can cause activity on the pins and observe activity on the status registers. Be sure to disable the EDMA for this testing. If the DSP is halted, you will have to have FREE/SOFT configured right to get activity to continue; you can leave the DSP running in a dummy loop or whatever and still write to the UART registers while it is running. You may need to do a Refresh Window to see the status bits change afterward.

    Technically (and IMO), the write to PWREMU_MGMT does not trigger the EDMA but it does implement an awesome feature that we did not have in our serial ports a few years ago - it tells the UART to send the UTXEVT event to the EDMA. I only say this because it is also possible that when you try to start the UART in non-bypass mode that the UTRST might have already been set and no new event got sent out by the UART (UTXEVT).

    Or maybe I should have asked whether with Loopback mode turned off you do see the EDMA trying to start. What exactly do you see happening with the EDMA? You can look at the PARAM for this channel and see if it counts off one transfer or zero or all of them. That will go a long way to help figure it out, too.

  • Randy,

    Thanks for the feedback and the pointers.  We eventually isolated the problem to being a bad RS-232 Driver chip (U28 on the EVM board).  The signals were going into the chip but nothing was coming out.  Don't know how but I guess it was a case of "Dr Sparky rides again!".  Once our lab replaced the chip on the EVM we could see voltages on the EVM's DB-9 pins.  That, however, led to another issue which was a bit more disconcerting...

    In my code to initialize the UART, I am clearing the FIFO TX and RX registers using FCR:TXCLR and FCR:RXCLR, (FCR:DMAMODE1 = 1 in all writes).  At the same time LCR:DLAB = 0L:   I am setting DLL and DLH directly.   When you write 0x0000000F to FCR with LCR = 0x0000002B, DLL will change to 0x0000000F which changes your baud rate.  I can't find this "feature" described anywhere in the docs so it appears there is a bit of a "whoopsie" somewhere.  It took a while to track this one down.  Is this design behavior?

    Thanks again,

    Mike

  • Mike,

    When I read this last week, it was so far over my head that I blew it off to let someone else answer. But I notice no one else has chimed in. Please let me know if you have solved this or not on your own. If you have, please go ahead and post the solution, even if it was something simple, so others will be able to avoid the same thing in the future. If you have not solved it, I will try to push internally to get someone more knowledgeable on the C6747 UART details to look at it.

  • Randy,

    The original problem with the C6747 UART not working turned out to be the bad RS-232 driver chip on the EVM board.

    The secondary problem with a write to the UART FIFO Control Register (FCR) overwriting the UART DLL register looks like it is a silicon issue.  Please let me know if I should start a second thread on it because the functionality of the FIFO register is not as reported.  In searching SPRUFM6, I can't find any reference to the FCR being multiplexed with the DLL register.  When I wrote the code, I loaded DLL and expected the register to keep its value when I subsequently wrote to FCR.  That was not the case.  When I wrote to FCR, it trashed the value that I loaded in DLL.

    Please let me know if you want me to start a second thread.

    Thanks,

    Mike

     

  • Please do start a second thread. The new title and new-ness will help.