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.

TMS320F28027F: Flash programming not working with XDS110 Debug probe

Part Number: TMS320F28027F
Other Parts Discussed in Thread: TMS320F28027, LAUNCHXL-F28027F

I am unable to 'Flash' the code to a microcontroller (TMS320F28027) on PCB using XDS 110 Debug probe. The Micro-controller on the PCB is successfully programmed in RAM configuration. I have made the necessary changes (changing the .cmd file).

The same code works in 'Flash' mode when used on Launchpad (Launchxl-f28027F) using XDS 100V2 debug probe. 

I have included the necessary .cmd file.

I have included the following lines:

memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t) &RamfuncsLoadSize);
InitFlash();

The build settings are set as:

Here is the schematic of the debug connection for the board on PCB:

The code is a simple modification of  'Example_2802xEPwmDeadBand'.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//###########################################################################
//
// FILE: Example_2802xEpwmDeadBand.c
//
// TITLE: Check PWM deadband generation
//
// ASSUMPTIONS:
//
// This program requires the f2802x header files.
//
// Monitor ePWM1 - ePWM3 on an Oscilloscope as described
// below.
//
// EPWM1A is on GPIO0
// EPWM1B is on GPIO1
//
// EPWM2A is on GPIO2
// EPWM2B is on GPIO3
//
// EPWM3A is on GPIO4
// EPWM3B is on GPIO5
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Please let me know how I can fix this issue.

  • Hi Ujjwal,

    When you load the "flash" application to your custom board from CCS what does the failure look like: does CCS show errors? If not, once you load the application from CCS and issue a run from CCS does the application execute but not when you issue a reset? Please do provide additional details as that would help.

    For Standalone execution from Flash please check that the Boot Mode selection pins are configured correctly. Please see section 2.2.9 of the TRM https://www.ti.com/lit/ug/sprui09/sprui09.pdf.

    Thanks,
    Ashwini

  • Hi Ashwini,

    Thanks for a prompt response.

    When I load the "flash" application to the custom board from CCS: CCS does not show errors. Once I load the application from CCS and issue a run from CCS- Yes, the application executes but not when I issue a reset.

    The boot mode selection pins are configured in Standalone Boot Mode - GetMode:

    boot mode selection pins are configured in hardware:

    I couldn't read the value at 0x3D7FF in debug window to confirm that it flash  (Error: Memory map prevented reading).

  • Hi Ujjwal,

    I will sync up with the team on the boot mode configuration you have provided and get back to you.

    Thanks,

    Ashwini

  • Hello,

    When I load the "flash" application to the custom board from CCS: CCS does not show errors. Once I load the application from CCS and issue a run from CCS- Yes, the application executes but not when I issue a reset.

    The boot mode selection pins are configured in Standalone Boot Mode - GetMode:

    Hello Ujjwal,

    Is CCS connected, or the XDS100 connected, when trying to run from reset?  If yes, then the device will be looking at the EMU boot options are set.  (double check the state of TRSTn with a scope).   In CCS you can set the emu boot mode via scripts -> emu boot mode select -> flash

    Regards

    Lori

  • Hi Lori,

    1) While the CCS is connected (XDS 110), I tried scripts -> emu boot mode select -> flash

    Once the CPU is 'reset'. The code runs successfully after I click 'resume'.

    The code does not run once I disconnect CCS and power up the micro-controller on PCB. 

    When I use the same code and XDS 100v2 to program another launchpad-F28027F. The code runs once I disconnect CCS and power up the Launchpad. 

    2) I checked the state of the TRSTn pin on the oscilloscope: 

    • It is generally 'low' and goes high (3.3V) during 'programming/debugging'. I think this is fine.
  • Thank you for the details.  Can you check the value in the memory location highlighted below?  In your previous screenshot the address was not correct (0x3d7FF vs 0x3d7BFE)

  • Hi Lori,

    Thanks for pointing out my mistake, here is what i observe:

    0x3d7BFF: 0xFFFF

    0x3d7BFE: 0xFFFF

    I also checked

    0x0D00: 0x55AA

    0x0D01: 0x000B

  • Hi Lori and Ashwini,

    I have resolved my issue. It was my mistake.  The reason it was not working because I had a pull-down resistor at GPIO 34 instead of Pull-up (not shown in the schematic image posted above).

    Thank you for the fast and effective response.