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.

LAUNCHXL-F280049C: How to communicate with XDS110 while debugging

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: C2000WARE

Hello,
I use IS07_speed_control from C2000ware_Motorcontrol and I want to communicate via USB while I'm debugging.

I saw that it's possible to use both virtual com port at the same time and I found this setup in the SCI example. 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
// GPIO28 is the SCI Rx pin.
//
GPIO_setMasterCore(28, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_28_SCIRXDA);
GPIO_setDirectionMode(28, GPIO_DIR_MODE_IN);
GPIO_setPadConfig(28, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(28, GPIO_QUAL_ASYNC);
//
// GPIO29 is the SCI Tx pin.
//
GPIO_setMasterCore(29, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_29_SCITXDA);
GPIO_setDirectionMode(29, GPIO_DIR_MODE_OUT);
GPIO_setPadConfig(29, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(29, GPIO_QUAL_ASYNC);
//
// Initialize interrupt controller and vector table.
//
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

but when I start debugging, nothing work correctly.

Do I forgot something to use correctly both Com interface?

Best regards

Adrien

  • Hello Adrien,

    Please could you provide more details about your setup? How are you connecting and using the SCI? Which COM ports are being used - the ones that are enumerated by XDS110? Also, please provide any error messages you see when debugging.

    Thanks,

    Ashwini

  • Hello,

    I'm using launchxl_f280049C with boostxl_drv8320rs to control BLDC motors.

    When I plug my usb on my computer, I see that there is two com port:

    -xds110 class application/user uart

    -xds110 class auxiliary data port

    I'm not that sure which one is for degugger and which one is for user purpose.

    I want to use both to keep CCS debug mode open and to cummunicate via my computer with external programs.

    The problems is when I enable my function Serial_setup (code paste above), all my variable in expression window of debug mode turns to x/"bad" and nothing works.

    I assume this comes because I took debug communication bus for serial but how can I fix that?

    Best regards

    Adrien

  • Hello Adrien,

    The XDS110 does not use COM port for debug communication, it uses a separate bulk end point instead. So the debug issue with using COM port is something else.

    I gave the example "sci_ex4_echoback" in C2000Ware a try where I had the COM port for XDS110 Application/User UART open in terminal viewer and has the variable "loopCounter" in CCS expressions window with continuous refresh set.  I was able to see type in the terminal viewer and was able to see the variable change values in the expressions window.

    The only thing I can think of is maybe the BoostXL with the motor and SCI is creating enough noise on the debug pins to corrupt the debug connection? Could you also give the above example a try to see if it works for you. You can also check the  Launchpad documentation for information on the SCI/UART pins.

    https://www.ti.com/lit/ug/spruii7b/spruii7b.pdf

    Thanks,

    Ashwini

  • Hi again,

    I tried to use sci_example4_echoback in my code, I see that I can communicate correctly in my Putty .

    But if I use this I can't use debugger, I have in the debug window : 

    And if I try to change some value, I have this error message:

    C28xx_CPU1: Trouble Writing Memory Block at 0x4e6 on Page 1 of Length 0x1: (Error -1142 @ 0x4E7) Device blocked debug access because it is currently executing non-debuggable code.

    Do you think that it's possible to use both at the same time ?

    As I see there is two virtual COM but communication (Documentation also talks about this) and debugger seems to use the same. Can I root my communication on the other COM port (XDS110 Class Auxiliary Data Port) ?

    Thanks

    Best regards 

    Adrien

  • Hello Adrien,

    The target code is preventing the debugger from making debug accesses. There is a bit that controls if debugger accesses are allowed called DBGM. This is automatically set when an interrupt is taken. Please see the following document for more information on DBGM.

    https://www.ti.com/lit/ug/spru430f/spru430f.pdf

    Are you able to access the variables if you enable Rude real-time mode in Code Composer Studio? The following post has some documentation on using rude and polite mode in CCS.

    https://e2e.ti.com/support/tools/ccs/f/code-composer-studio-forum/829498/ccs-what-is-polite-real-time-mode

    Thanks,

    Ashwini