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.

CCS/MSP430FR2433: Trying to print data on console but ccs get halted

Part Number: MSP430FR2433


Tool/software: Code Composer Studio

Hi all,

I am trying to print data on console as per mentioned in this post

https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/788144

I am using MSP430FR2433 dev board and running CCS- Version: 10.1.1.00004 on linux environment.

I want to print debug messages using uart through usb connected to power up and debug board. I followed the same code as mentioned in the above post and when i try to run it, my CCS gets halted and it gives me error :

MSP430: Can't Run Target CPU: Could not run device (to breakpoint)
MSP430: JTAG Communication Error

I dont know what wrong i am doing. It will be great if anyone can suggest me possible reasons of not working or guide me how can i achieve this.

Thank you,

Shubham

  • Hi Shubham,

    Do you get same error if you attempt to run any other project?

    Maybe create simple project like and see if you get same error.

    main(void)

    {

    WDTCTL = WDTPW | WDTHOLD;

     for(;;);

    }

  • Hi Dennis,

    No with other project i am not facing any problem like i run blinky example and interface servo motor, both are working fine.

    Thanks

  • Hi Shubham,

    Ok, that is helpful.

    Are you using the exact same code as referenced in the other posting or have you made any changes?

    So when you see this error are you running in debug mode?

    If so, try setting various breakpoints starting at the beginning of the code and see how far you can get before the error appears.

    For example, set a breakpoint after the GPIO is initialized but before the clocks are configured, then another before entering the while() loop.

    I'm trying to see where in the code this issue appears.

  • Hi Dennis,

    Thank you for your reply.

    No i haven't change anything in the code except one change what he suggested in his answer.

    I tried what you suggested, i put breakpoints at different points like after GPIO initialize, UART initialize, it works till there even in the while loop there is no problem with the code.

    Problem starts when i initialize terminal to get data, CCS gets hang and LED101(Red) continuous ON state.

    My terminal settings:

    Baud Rate: 9600

    Port:- ttyACM0 (tried with ttyACM1)

    Shubham

  • Hi Shubham,

    I would recommend trying this example from the TI Resource Explorer and see if you have same issue.

  • Hi Dennis,

    I already tried this example by removing Tx and Rx Jumpers from J101 header and connected P1.5 to P1.4, but here i want to use back channel UART, dont  want to use external UART as it needs  RS232 converter.

    Thanks

  • Hi Shubham,

    Looking at the schematic for the MSP430FR2433 Launchpad, it shows P1.4, P1.5 connected to the J101 header by default, which means it connects to the programmer's back channel UART.  Not sure why you have to remove jumpers

    My point with trying the sample code is it has been tested and works on that launchpad using the back channel UART and would provide us with a working reference point.

  • Hi Dennis,

    Yes you are correct, and i understood your point also.

    I tried same what you said and following are my observations:-

    1. When i run sample code as it is, no change in hardware configuration, i observed that it is not going into ISR when data is transferred.

    2. When i run sample code as it is, removed Rx and Tx jumpers from J101, and loopback P1.4 and P1.5, it is going into ISR and working properly.

    Thanks

  • Hi Shubham,

    This behavior is correct when P1.4 and P1.5 are connected, as this sends a byte out the TX and back in the RX.

    If you reconnect the TXD and RXD jumpers and run the same code and try to send a byte from your terminal app the code will get stuck in the loop with the LED because the code is expecting the same byte it transmitted to be returned.

    If you are going to send data from PC to MSP430, this code is not the correct code to do that.  It only tests the UART.

    For that you need this example, which will echo back any byte received from the PC back to the PC.  It's up to you to modify this code to perform the operations you need for your application, but at least it will confirm serial communications from the PC to the MSP430 and back to the PC.

  • Hi Dennis,

    Thank you for your reply.

    Actually i am trying to send data from board to PC, so that i can implement PRINT functionality for debugging purposes. This is my first priority, and sending back data from PC to board will be additional thing i will try to do later.

    Even though i tried to implement this functionality also using the sample code you shared and still i am not getting the correct response. If you can see in below image, i am getting garbage values when i press any key, and after few minutes board get halted

    Those results are with RXD and TXD Jumpers are connected to the J101 header.

    Baud rate - 9600 (as per the configurations in the code)

    OS - Linux

    Serial port - ttyACM0 (I can see ttyACM1 also, and when i reconnect the usb cable it shows ttyACM1 and ttyACM2) not able to understand which i need to use as there is no proper documentation i found for Linux environment, which is supposed to be present if TI is giving Linux support but i can see very little information is present )

    Thanks,

    Shubham

  • Hi Dennis,

    I am able to resolve my issue by using this sample code:-

    https://dev.ti.com/tirex/explore/node?node=ALmjIxqCiPoBS2RtYoT2vw__IOGqZri__LATEST

    The difference between the the other examples is:-

    1. Clock initialization, which was not happening in other.

    2. Board rate settings is different

    Also for anyone who is working on same environment: COM port i used is ttyACM1 (for me there ere 2 COM ports ttyACM0 and ttyACM1 )

    Now i am able to send data from board to PC using Backchannel UART (no external h/w is required)

    Thank you

    Shubham

**Attention** This is a public forum