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.

question on uart_loopback_24mhz_brclk

Other Parts Discussed in Thread: MSPWARE

Hello, my questions are two part.

  1. what is the smclk frequency for the 432 part for the launchpad dev kit for calculating the baud rate for the "backchannel uart"?

      The demo says 24Mhz, but I am not so sure. Is there a pin I can connect a scope to to provide "ground truth"?

  2. what pin is safe to connect a ground pin to when interfacing to the "backchannel uart"? 

     I tried two labeled grounds on the devkit each of which caused the CCS debugger to raise a JTAG error ->

Error connecting to the target:
(Error -1170 @ 0x0)
Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
(Emulation package 6.0.228.0)

Then I gave up trying to connect a ground pin.

The context of what I am trying to do follows:

Basically, I used this  demo as a template, changing the code to transmit ascii 0x30 "0" in a loop, hooking the transmit pin to "minicom" running on a linux box.

I first tried the default baud rate in the demo. This didn't work. Using the baud rate calculator, I found the code did not match the out put of the calculator, so I tried again, but it still failed. Then worrying that the baud rate was too fast, I slowed it to 9600, and it still failed.

The formula is from: http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430BaudRateConverter/index.html

For every scenario I tried, I saw a stream of garbage characters. The demo unmodified obviously works for every baudrate because the receive and transmit are based on the  same clock from the same board. But this doesn't help me because the minicom receiver is off-board.

I need to know what the clock is for the launchpad devkit for the 432 P401R, and how to verify it. The user guide does not provide enough information.  

Any help?

  • Hello Robert,

    Looking at the MSP432 DriverLib example on dev.ti.com -. Resource Explorer, I see the MSP432 DCO is being set to 24MHz and the eUSCI configuration for UART does match the MSP430 Baud Rate Converter calculator settings. When suing the calculator, please remember to change the drop-down to eUSCI and to fill in the custom clock to 24000000 for it is done as Hertz. If you would like to double check the MCLK/SMCLK/ALCK frequency settings, you can output the clocks to a pin and measure with an oscilloscope. We provide plenty of C code examples of this within the Resource Explorer in MSPware, but there are also DriverLib APIs for this as well. Please check the DriverLib API User Guide for this information.

    As far as Ground pins to connect to, any of the GND pins at the bottom of the launchpad will do. There are two at the bottom right side of the launchpad as well as two more beside the voltage rail pin on headers J7 (Left bottom of board) and J6 (right bottom of board).

    Hope this helps!

    Regards,
    JH
  • Hi, Jace,

    Ok. I note the difference between USCIand eUSCI, and recoded - but still no joy. 

    Can you point me to a schematic for the dev kit? The handout that comes with the dev kit does not show the backchannel uart. 

    One of my questions now is whether the TX output drives 5v or 3.3v.

    I have the ground right, and hooked up a scope and I see data - but I still don't see data at the minicom side.

    I'm pretty sure its an rs232 to usb converter issue now. 

    bob s.

  • Hello Bob,

    You can find schematics for the LaunchPad within the Launchpad User Guide located here: www.ti.com/.../msp-exp432p401r

    All signals from pins coming from the MSP432 will be at a max limit of VCC. This is 3.3V. The 5V rail is included on the launchpad for the USB operation within the debugger for MSP432 does not have an USB module. The 5V rail is also included to meet Launchpad pin-out standards.

    The BackChannel UART is just normal UART lines from the MSP432 that is routed through the USB debugger. If you are physically tapping into these lines, then it is just a normal UART interface. The advantage of the "BackChannel" status is that it allows easy debugging of UART through the USB debugger on board. (The USB debugger translates the UART data to USB packets on a separate COM Port on the PC.) This allows development and debug without having to add additional hardware to translate UART lines to an interface the PC can understand.

    Regards,
    JH
  • Hi,
    I took your advice and used the back channel uart /usb and connected via python program running on my mac, and I can report that there is data.

    The port seen on my mac iis "/dev/tty.usbmodem00000001"

    Hooray... However...

    Set at 9600 baud, I sent a stream of 0xAA's from the launchpad dev kit and received 0x55's on my mac.

    It seems there is a difference in what is a zero and one between a "normal" usart and a digital usart.

    Is there a control bit I can set to flip the bits? Or could this be a big-endian, little endian problem?

    ----> ok, I'm replying to my own message. It IS a big/little endian problem.

    I changed 

    EUSCI_A_UART_MSB_FIRST 

    to:

    EUSCI_A_UART_LSB_FIRST

    and now I see my data.

    Thank you for being a listening board !



    thanks,

  • Robert,

    Thanks for reporting back with your answer. Good luck with your project!

    Regards,
    JH

**Attention** This is a public forum