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.

F28335 start from flash



Hi all,

I did some programming using the HVPM_Sensorless_2833x example as a framework. During development I was using the RAM. Now I wanted to create a "release" version that should be stored in flash memory. So I just excluded the RAM .cmd-file from build and included the FLASH .cmd-file.

Programming seems to be fine. No errors or warnings. Flash memory is erased and written according to the status line in the bottom right corner of CCSv4. However the program wont start even if I hit run in the CCS debug window. I initialized the lsw variable with value "2" and buildlevel is 4.

In RAM mode everything works fine. I just have to load the program, hit run and done. But I guess there is more to do than just changing the .cmd file?

Thanks for your support!

Greetings

Philipp

  • Hi,

    also please add DSP2833x_CodeStartBranch.asm file to your project, build, load to flash and try to run DSP at standalone mode.

    Regards,

    Igor

  • Hi Igor,

    this file is already included.

    Greetings

    Philipp

  • Philipp,

    also perhaps you need to define "FLASH" at "Predefined symbols" option of  "Advanced options"  of Project's Properties.

    Regards,

    Igor

  • This is also already done :( Sry for the missing information.

  • Phillipp,

    The instructions for converting a RAM project to run from FLASH can be found in SPRA958L. This should give you all the information you need. 

    Please let me know if there are any other issues that arise.

    Thanks,

    Mark

  • Philipp,

    Making sure to define the symbol FLASH would've been my guess.

    Can you define what 'won't start even if I hit run in the CCS debug window' means?   Can you set a breakpoint at DeviceInit and see if it gets there at least?


    Thank you,
    Brett

  • Hi Brett,

    When I loaded the program the processor is suspended at main(). If I then use the "step over" feature I reach the idle for-loop. Also memcpy and InitFlash() is executed. If I continue clicking "step-over" I can see the increasing "IsrTicker" value. And if I hit "run" after I stepped to the idle loop, to program runs as expected. There is an LED on the controlCard that is flashing, showing that the idle tasks are executed.

    However, if I click "run" after loading the program or restarting the CPU there seems to be an issue with memcpy, because every time I halt the CPU it stops at HVPM_Sensorless-DevInit_F2833x.c in line 654 which is the memcpy function.

    Regards,

    Philipp

  • Philipp,

    I noticed a few things with regards to the project (mainly the DevInit file) which may be causing some of the issues.

    1) DevInit(2833x) - InitFlash - change PAGEWAIT to 5, RANDWAIT to 5 and OTPWAIT to 8.  This will allow it to fall in line with the device datasheet.

    2) DevInit(2833x) - PieVectTableInit - change *Dest++ = *Source;     to      *Dest++ = *Source++;   

    Both of the above allow the project to look more like the more often updated DSP2833x_SysCtrl.c and DSP2833x_PieVect.c

    3) HVPM_Sensorless.c - MemCopy -

    Can you try to use MemCopy as below:

    Function prototype-
    void
    MemCopy(Uint16*, Uint16*, Uint16*);

    Variable declarations-
    extern
    Uint16 RamfuncsLoadStart, RamfuncsLoadEnd, RamfuncsRunStart;

    Function call-
    MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);


    -----

    Can you see if the above fix the issue?  If it does I'll file a bug against the software.  (otherwise we'll keep digging)


    Thank you,
    Brett

  • Brett,

    I applied all your suggested changes. And now it works! It's starting from flash as soon as I connect the board to power.

    Thank you so much! Now my system is basically complete and running. Powered by TI :-)

    Regards,

    Philipp

  • Philipp,

    Excellent!  I'm glad that fixed it.  I'll now put in a bug request against the project.

    If you don't mind, what is it?  Inverter?


    Thank you,
    Brett

  • Brett,

    yes indeed. It's an inverter using Semitrans IGBTs and SKHI drivers. It's powering a 45 kW (nom.) synchron motor from 0 to 6000 rpm. Below there are some additional circuitries (supply, hardware security module and signal amplifiers) and the F28335 on the very bottom with two channel current and Sin/Cos position feedback.

    The inverter will be replaced by Semix4 modules soon because it's nominal current is too low for using the motor at full load.

    Regards,
    Philipp