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-F28027: Code runs slower when powered up than when flashed in CCS

Part Number: LAUNCHXL-F28027

I am using the LAUNCHXL-F28027 to drive a dot matrix display. I send the data to the board in a loop in main without using a delay. If I flash my code to the board in CCS, it is running without issues and is fast enough to redraw the display without any visible scan lines.

I am using S1-1 up, S1-2 up, S1-3 up, and S4 down so I can reflash the board, and also run my application on board power up.

When I power the board up and my code runs, it is drastically slower than when I re-flash the board and the code runs. On power up, the display is updating much more slowly with visible scan lines.

Why would my application run more slowly on power up, than it does after the board has been flashed?

I also saw this issue when blinking an LED every second. The LED would slow down to blinking every ~4 seconds.

  • Hi Tim,

    Tim Fenwick said:
    When I power the board up and my code runs, it is drastically slower than when I re-flash the board and the code runs. On power up, the display is updating much more slowly with visible scan lines.

    Can you provide more details on what you mean? Are you running the application from Flash in both cases (or RAM when connected to CCS), and when you disconnect from code composer and power cycle the board for standalone run it's slower?

    Please see the E2E answers below as they may explain what you're witnessing when running from Flash:

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/758797

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/759912

    Best,

    Kevin

  • Hi, thanks for that information.

    To be clear:

    - When I click "Flash" in CCS, my code is uploaded and my code runs as I'd expect

    - When I power my board, my code is running, but very slowly

    I tried including this in my code:

    InitPll(DSP28_PLLCR, DSP28_DIVSEL);

    and this seems to have resolved my problem. My code now seems to run the same whether run on power up, or run after clicking "Flash" in CCS.

    For my understanding, please could you help with the following:

    - What is the PLL? I can see it stands for phase-lock loop, is it an on-chip clock module?

    - Why did I see a difference in behavior after flashing my code, and powering up my board?

    - Do I need to include this in my code, for my application I don't see a difference when including it: memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

    Thanks.

  • Hi Tim,

    Not certain what you mean by clicking "Flash" in CCS. Maybe the green debug button to load the code and start the debug session?

    Nevertheless, glad you resolved your issue. The PLL is a module in the device used for clocking the CPU and different peripherals of the device. The module is documented in section 1.3 "Clocking" of the F2802x TRM if you're interested in learning more:

    http://www.ti.com/lit/sprui09

    Tim Fenwick said:
    Why did I see a difference in behavior after flashing my code, and powering up my board?

    Not certain what you're meaning when you say "flashing my code". Do you mean loading the program in CCS, running from the device's RAM or Flash? I'm sure digging into this concept and your code would lead to the explanation.

    Tim Fenwick said:
    - Do I need to include this in my code, for my application I don't see a difference when including it: memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

    You should if running the program from the f2802x device's Flash, to copy certain functions to RAM.

    Best,

    KEvin

  • By flash, I mean this button (I'm using CCS 8):

    Thank you for your help.