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.

blinky_c28 does not blink

Other Parts Discussed in Thread: CONTROLSUITE

The example project blinky_c28 does not blink when connected to the debugger.  I am using a recent version of controlSUITE (how do I see the version number? The file property version number is 1.2.0.0) and CCS version 5.1.0.09000.  I am using the controlCARD TMDXCNCDH52C1 with the XDS100v2 emulator. I am able to load, flash and run blinky_28.

It works when not connected to the debugger.

The project blinky_dc_c28 states in the source code that it only works when disconnected from the debugger -- and it does.  It is almost identical to blinky_c28.

When I pause the code and try to set GpioG1DataRegs.GPCDAT.bit.GPIO70 to 1, it immediately resets to 0. This happens whether GpioG1CtrlRegs.GPCDIR.bit.GPIO70 is 1 or 0.  This behavior survives a power cycle on the board when I reload just the C28 version of Blinky, so if the m3 is interfering, it is something that survives a power cycle. 

Changing blinky_c28 to use GPIO71 instead of GPIO70 does not help.

The following comment is from Austin Miller from TI:

"I have been playing with this example myself. I notice that any access to the GPIOG1DAT register is ignored or reset to 0x0. Even the access during initialization is
ignored before the infinite for loop. However accesses to the GPIOG1Ctrl register are allowed."

Should I expect this simplest of programs to work with the debugger?

  • Don,

    Sorry to hear you are having trouble.  There are some dependencies in the bootROM that must be met in order for the C28 application to run correctly.  For the blinky_dc example the Flash build config will in fact run standalone (as you've stated), but won't run with the debugger connected.  The RAM build config however will run with the debugger connected to each core.  Try right clicking on each project and changing to the RAM build configuration.

    You can tell the version of the device support library by looking at the path of one of the files in it.  For instance, right click on the blinky_dc_m3.c file and select properties.  The "Resolved Location" should be something like:

    C:\TI\controlSUITE\device_support\f28m35x\v110\F28M35x_examples_Dual\blinky\m3\blinky_dc_m3.c

    the folder under f28m35x will be the version of the device support library you are currently using, which is this case would be v110.

    I know my answer on why this is happening isn't very complete, but I am not an expert on the bootROM on Concerto.  I will contact one of my colleagues to see if he can add some more detail.

    Trey

  • Don,

    adding to whatever Trey mentioned above if you want to run the same example, but with debugger connected you have to keep in mind about the below things.

    1.> The application on M3 is sending IPC to boot ROM on C28x. So C28x boot ROM has to be running good to handle this. The last five posts on page 3 of this forum post (http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/t/126824.aspx?PageIndex=3) explains this.

    2.> When you have debugger connected and want to debug your applications in M3 flash and C28x flash, you don't have to send the IPC Boot commands from M3 application to C28x boot ROM. This sending of Boot mode IPC commands from M3 application to C28x boot ROM is only needed in stand-alone mode of operation.

    when you have debugger connected you can comment out the function on M3 application that sends the boot mode IPC command and you just program M3 application from debugger and C28x application from debugger to flash and click run on both the cores.

    After you have debugged your applications in flash and ready to go test the application in stand-alone mode jsut put back the function/code that sends Boot Mode IPC commands on M3 application and flash M3 application.

    Please let us know if you have anymore questions and or have difficulty in getting this to RUN the way you wanted.

    Best Regards

    Santosh

  • I tried using the RAM build configuration for blinky_c28.  I am able to debug, stepping through the code, but the LED's do not come on, even though I am hitting the line

    GpioG1DataRegs.GPCDAT.bit.GPIO70 = 1;

    Is this because of the "dependencies in the bootROM"?

    For blinky_dc_c28, there is no RAM option when I try to change the Build Configuration.  The same is true for blinky_dc_m3.  All of my other projects allow me to switch between FLASH and RAM.  A search of E2E did not help me figure out how to enable the RAM build configuration.  How do I give blinky_dc_c28 a RAM build configuration?

  • Hi Don

    GPIOs by default on reset are owned by master subsytem (M3), please make sure that M3 application assigns the needed IOs to control subsytem (C28x) before they are toggled by control subsystem.

    please refer to GPIOCSEL register in the device TRM manual. I beleive TI examples take care of this in the M3 application but I'm not sure how you are running/debugging your application.

    It would help understand better and point out the problems if you can list out the steps you are following when you see the problem.

    Please let us know how it goes.

     

    Best Regards
    Santosh

  • I can now debug blinky_28.  I followed these steps:

    1) in blinky_dc_m3, comment out IPCMtoCBootControlSystem(CBROM_MTOC_BOOTMODE_BOOT_FROM_FLASH);

    2) set the blinky_c28 project to run in RAM.  As noted above, I could not configure blinky_dc_c28 or blinky_dc_m3 to run in RAM.

    3) flash the blinky_dc_m3 project and the blinky_c28 project.

    4) run the blinky_dc_m3 code.

    5) step through the blinky_c28 code -- the led changes as it should.

    It appears that blinky_c28 cannot work unless the code running in the m3 module has set up the GPIO.  I am guessing the following lines are what does it:

     // Enable clock supply for GPIOC

    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);

    // Give C28 control of Port C pin 6

    GPIOPinConfigureCoreSelect(GPIO_PORTC_BASE, 0x40, GPIO_PIN_C_CORE_SELECT);

    I still do not understand why blinky_dc_c28 and bliny_dc_m3 do not have RAM build configurations.  (?)

    .

  • Don,

    2) It sounds like you have an old version of the device support library for Concerto.  Try updating controlSUITE.  The latest version of device support for Concerto is v110.

    You are correct the M3 must give control of a GPIO to the C28 before the C28 can alter the GPIO.  If you just load code onto the C28 while debugging, this won't occur and hence you won't see the LED blink.  All of the control subsystem examples should first load and run the "setup_m3" project before executing any code on the C28 as this effectively gives control of all of the GPIOs to the C28.

    The new build configurations were added in v110.  Please  update you controlSUITE installation and the new examples will have the build configurations.

    Trey

  • When I start the controlSUITE application, select Update, and click Check for updates, it tells me I am up to date.  The revision notes are Revision Notes - v2.7.0 - January 17, 2012.  This is the version of controlSUITE that I have been using when I ran in to these problems.

    In the controlSUITE folders, I import the project from C:\TI\controlSUITE\device_support\f28m35x\v110\F28M35x_examples_Dual\blinky, so I am using v110.  I deleted the projects and re-imported them but I still do not have a RAM build configuration.

     

  • Don,

    Oops, you're correct.  I must have gotten some stuff copied around on my PC where it shouldn't be.  The v110 version in fact does not have the dual build configurations for that example.  We've added them to our copy internally, and these new build configurations will be included in the next release.

    For now it sounds like you have the problem under control and can continue development, correct?  Let me know if you need further assistance.

    Trey

  • Yes, no more help needed on this problem.  I can work with the blinky_c28 module.  Thank you for your help.