TMS320F280039C: Program doesn't run after power recycle of the board - flash issue

Part Number: TMS320F280039C
Other Parts Discussed in Thread: BOOSTXL-BUCKCONV, C2000WARE, POWERSUITE, SYSCONFIG, STRIKE

Tool/software:

Hi,

I'm using the F28004x TIDM DC-DC buck example and migrating it to F280039C control card board, made a few modifications to use 120MHz SYSCLK frequency as shown below, and made changes in ADC configs to read Vin, Vout, Iout - all of which are working fine (compilation and run). But I'm unable to flash the program to the board, though the 2 Boot mode GPIO pins are set to FLASH boot mode - 1. And the disassembly view also shows that the main program and GPIO pins are in the Flash memory addresses, I'm using the f28004x_codestartbranch.asm and f28004x_flash_lnk.cmd files as they are the default ones and no issues are seen during compilation (since F28003x and F28004x have the same Bank0 and Bank1 memory map and sector sizes). But, once the power connection is off and again turned on to the board, then the program doesn't run. The build configuration is set active in RELEASE mode and no other build configuration options are available. Requesting help for methods to flash the codebase.

#define DEVICE_SETCLOCK_CFG (SYSCTL_OSCSRC_OSC2 | SYSCTL_IMULT(48) | \
SYSCTL_REFDIV(1) | SYSCTL_ODIV(4) | \
SYSCTL_SYSDIV(1) | SYSCTL_PLL_ENABLE | \
SYSCTL_DCC_BASE_0)

//
// 120MHz SYSCLK frequency based on the above DEVICE_SETCLOCK_CFG. Update the
// code below if a different clock configuration is used!
//
#define DEVICE_SYSCLK_FREQ ((DEVICE_OSCSRC_FREQ * 48) / (1 * 4 * 1))

Thanks,
Geetha Priya

  • Hi Geetha,

    What build configuration are you currently testing? For our open-loop configurations, the dac/duty are set as 0 on initialization and as such when you are booting from flash, they will not be controlling any voltage on the output. Additionally, are you verifying that the project is operation through other means? Since this is different hardware, the heartbeat LED should be reconfigured to the match the controlCARD's LED pins.

    Regards,

    Peter

  • Hi Peter,

    I'm using the target config file - TMS320F280039C.ccxml and build configuration is set active in RELEASE mode. For the open loop configuration in Lab 1, I've initialized the duty cycle value in BUCK_dutySetRef_pu to 0.32 before compiling the project and running it. Yes, I'm verifying through LED heart beat as well, and have changed the LED GPIO as 31 as per F283009C control card pin mapping, and it is working when the program is running on board, but stops after power cycle.

    Thanks,
    Geetha Priya

  • Hi Geetha,

    Thanks for that confirmation. Can you show me what predefined symbols are defined in your project? You will want to ensure that _FLASH is included since the device.c file is looking for this predefined to properly initialize the flash module

    Regards,

    Peter

  • Hi Peter,

    Yes, _FLASH is included in the predefined symbols section.

  • Hi Geetha,

    Allow me to confirm with our flash experts to confirm with if there are any other conditions which need to be met. I will also try to run the BOOSTXL-BUCKCONV hardware to verify on my side

    Regards,

    Peter

  • Hi Peter,

    Is there any update from the Flash experts or were you able to run and verify flashing on the F280039C board.

    Regards,
    Geetha Priya

  • Hi Geetha,

    I spoke with our Flash expert and he gave a number of points to check

    1. He recommends to use the corresponding codestart and linker command file for F280039C device, these can be found in the C2000Ware folder,

    2. Recommendation is to start with a generic example project for F280039C project and verify that boot from flash works as expected by programming a simple blinking LED example.

    3. Afterwards, recommend to pull in the updated buck converter reference design code into the new project and test the build and debug of the project


    Regards,

    Peter

  • Hi Peter,

    1. Yes, I've tried using the f28003x_codestartbranch.asm and f28003x_flash_lnk.cmd from the Dual Active Bridge example for F28003x in the PowerSuite Solutions and replaced in the buck example, still flash didn't work.

    2. Yes, LED blink, Dual Active Bridge and other examples specific to F280039C are flashed and working even after power cycle.

    3. But, unable to pull in buck sysconfig into the new project since it is based on Power suite and throwing the error as shown below. I tried following this migration tutorial https://www.ti.com/video/6309991000112 , but couldn't resolve this error.

    Could you please help to sort this with any other workaround.

    Thanks,
    Geetha Priya

  • Hi Geetha,

    It is much easier to port the nonPowerSUITE version of the code since there is no dependency on sysconfig for settings generation, can you try copying that into the new project instead?

    Regards,

    Peter

  • Hi Peter,

    To copy the non-powersuite version to a new project, which driverlib should be used, since I want it to be implemented on F280039C and the original example uses driverlib_eabil.lib and include files that refer to the F28004x driverlib, I'm seeing compilation errors. I tried changing the driverlib, flash_lnk.cmd, codestart - all with respect to f28003x (also tried copying these files from the Dual Active Bridge example that uses F280039C), but it is missing some .h files from the driverlib that was used in f28004x.  Could you please provide more clarity on what migration changes are to be made. 

    Thanks,
    Geetha Priya

  • Hi Geetha,

    I think we are not taking the same approach. Rather than copying the linker command file, driverlib library, codestart etc. from the project to the nonPowerSUITE version, I think it would be easiest to copy the files from the nonpowerSUITE project to the blinky LED template project which is already configured for F28003x. That project will already have the appropriate device and library files for the F28003x and you can test that the boot from flash works properly. After testing that, you can then copy the .c and .h source files over from the nonpowerSUITE project. After doing this, you can try to port by changing the pin configurations etc. in the settings.h files, but I won't expect you will have any issues with the flash or driverlib compatibility. Please feel free to provide screenshots of any errors you are seeing from your side

    Regards,

    Peter

  • Hi Peter,

    I tried flashing the Dual Active Bridge  - nonpowersuite version F28003x example - which worked even after power cycling. Didn't try copying files to LED blinky since it didn't have the device files as a part of the project. Hence, I chose Dual Active Bridge example. Tried copying files from buck non-powersuite project to dual active bridge non powersuite project. But seeing the below error while compiling:

    Below are the include files in this project

    Could you please let me know how the above compilation errors could be resolved.

  • I replaced the DCL library folder from buck example to DAB example - which resolved the first error. But, the below errors are seen as they are not defined in xbar.h, hw_memap.h and asysctl.h of the F28003x driverlib.

    All the .h files are displayed with a strike on the icons, not sure if they are being called correctly during compilation as shown below. 

    Could you please help on how this could be resolved. 

    These are the include files used, is there any change to be made here?

    Thanks,
    Geetha Priya

  • Hi Geetha,

    The F28003x device has only 4 CMPSS modules so you will not find a CMPSS6 peripheral. This is why it is not defined in the cmpss.h file. You should substitute the CMPSS6 with another unused CMPSS module 

    Regards,

    Peter

  • Hi Peter,

    Thank you so much for the help, the above method worked, I'm able to successfully flash the F280039C board with the DC-DC buck project.

    Regards,
    Geetha Priya