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.

TMS320F28335: code not loading correctly

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

I am trying a simple LED blinking code on the control card.

It is built successfully and I think is flashed also on the device.

The code is simple but doesn't work.

It had worked once (LED L3 was blinking) but when I tried to erase the sectors to load  a new code, it stopped working post that.

How to ensure that the code has got flashed correctly.

When I try to use the debugger to step over the code line, the debugger executes correctly, but LED does not blink

Any guidance will be appreciated

main.c

# include "DSP28x_Project.h"
int res = 0;
int main(void)
{
InitSysCtrl();

EALLOW;
GpioCtrlRegs.GPAMUX1.bit.GPIO3 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO3 = 1;
GpioCtrlRegs.GPAPUD.bit.GPIO3 = 0;

EDIS;

while(1)
{
GpioDataRegs.GPATOGGLE.bit.GPIO3 = 1;
res=GpioDataRegs.GPATOGGLE.bit.GPIO3;
DELAY_US(100000);
}

return 0;

}

  • Hello Shraddha,

    It had worked once (LED L3 was blinking) but when I tried to erase the sectors to load  a new code, it stopped working post that.

    How to ensure that the code has got flashed correctly.

    Are you erasing the Flash sector by using the Flash API from RAM or ROM? That is the valid way of erasing a sector. Are you trying to erase the sector which contains the functioning code, or are you just powering on the device and running code immediately? I'm not sure I understand what steps you're taking to run the code.

    When I try to use the debugger to step over the code line, the debugger executes correctly, but LED does not blink

    Can you please verify whether the proper registers are configured and what the code in the Disassembly Window looks like? I'm not sure I understand, but it sounds like you're erasing the sector in which the function for the LED blinky is located.

    Best regards,

    Omer Amir

  • Hi Omer,

    I am using this F28335.cmd provided in the CCS installation C:\ti\ccsv8\ccs_base\c2000\include

    I am using CCS Version: 8.3.1.00004 

    I am following instructions from below link:

    https://dev.ti.com/tirex/explore/content/c2000_academy_2_04_00_50/_build_c2000_academy_2_04_00_50/source/c2000_legacy_devices/F2833x/F2833x_workshop.html

    Can you confirm this is correct to get started with F28335

  • Hello Shraddha,

    Can you confirm this is correct to get started with F28335

    This and C2000Ware are good resources for this device. Is this your first device that you're using with C2000, or are you working on a system that happens to be using this device? Is there a reason you're not using one of the newer devices? Many of the devices in this generation are years old, and have since been improved upon for newer devices.

    If you still intend to continue using this device for your application, can you tell me are you just running the example as is in a debug session, or are you modifying it or trying to re-program it in someway?

    Best regards,

    Omer Amir