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.

Concerto c28x blinky from boot



I have a Concerto f28m35x control card.  Using v150 of the Control Suite, I'm trying to get both the blinky_dc_m3 and blinky_dc_c28 code to blink after resetting the control card's power supply.  I am loading both of them in flash.   I have all the setting switches in SW1 in the down position.  When I cycle power, the m3 blinky does work with no debugger attached.  However, the c28 blinky only works right after being loaded in the debugger.  I saw another thread here that implied simply adjusting the SW1 switches would solve this problem and allow the c28 to boot from flash.  Is there some other configuration I should be using or a line of code that is not included in the examples?

  • Kevin

    can you check if you have _STANDALONE and _FLASH defined in your M3 project? Master application will have to send an IPC to C-Boot ROM asking it to go start the application in control subsystem flash.

    Best Regards

    Santosh

     

     

  • Here is a snippet of the code from the m3 blinky.

    #ifdef _FLASH

    // These are defined by the linker (see device linker command file)
    extern unsigned long RamfuncsLoadStart;
    extern unsigned long RamfuncsRunStart;
    extern unsigned long RamfuncsLoadSize;
    #endif

    //*****************************************************************************
    // The error routine that is called if the driver library encounters an error.
    //*****************************************************************************
    #ifdef DEBUG
    void
    __error__(char *pcFilename, unsigned long ulLine)
    {
    }

    #endif

    //*****************************************************************************
    //
    // Blink LED3
    //*****************************************************************************
    int
    main(void)
    {

    volatile unsigned long ulLoop;

    // Disable Protection
    HWREG(SYSCTL_MWRALLOW) = 0xA5A5A5A5;

    // Sets up PLL, M3 running at 100MHz and C28 running at 100MHz
    SysCtlClockConfigSet(SYSCTL_USE_PLL | (SYSCTL_SPLLIMULT_M & 0xA) |
    SYSCTL_SYSDIV_1 | SYSCTL_M3SSDIV_1 |
    SYSCTL_XCLKDIV_4);

    #ifdef _FLASH
    // Copy time critical code and Flash setup code to RAM
    // This includes the following functions: InitFlash();
    // The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart
    // symbols are created by the linker. Refer to the device .cmd file.
    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

    // Call Flash Initialization to setup flash waitstates
    // This function must reside in RAM
    FlashInit();
    #endif

    #ifdef _STANDALONE
    #ifdef _FLASH
    // Send boot command to allow the C28 application to begin execution
    IPCMtoCBootControlSystem(CBROM_MTOC_BOOTMODE_BOOT_FROM_FLASH);
    #else
    // Send boot command to allow the C28 application to begin execution
    IPCMtoCBootControlSystem(CBROM_MTOC_BOOTMODE_BOOT_FROM_RAM);
    #endif
    #endif

    First I run the m3 blinky, and then the c28 blinky.  After cycling power, only the m3 blinky still blinks.  Is there something I need to change in the above code to allow the c28 code to boot from flash?

  • Kevin,

    please step through the code and see if the below gets executed, it should get executed for M3 to let C28x start its blinky application. If it is not getting executed then there is your problem. Check your build settings to let the below defines defined.

    #ifdef _STANDALONE
    #ifdef _FLASH
    // Send boot command to allow the C28 application to begin execution
    IPCMtoCBootControlSystem(CBROM_MTOC_BOOTMODE_BOOT_FROM_FLASH);
    #else

     

    Best Regards

    santosh