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.

Using SYS/BIOS with F28335

All:

It looks to me like there a few less requirements under SYS/BIOS than under DSP/BIOS with respect to setup at main( ) - can someone confirm?

With DSP/BIOS, there was a method of setup when the code reached main( ) - is SYS/BIOS different in terms of setup at main( )?

Here are the steps as defined in the DSP/BIOS lab of the Delfino 3-day workshop, and some questions...

void main(void)
{
//--- CPU Initialization
 InitSysCtrl();      // Initialize the CPU (FILE: SysCtrl.c)   Question: Is this still required with SYS/BIOS?
 InitGpio();       // Initialize the shared GPIO pins (FILE: Gpio.c) - I can only assume that this is still required...  
 InitPieCtrl();      // Initialize and enable the PIE (FILE: PieCtrl.c)  Question:  Is this still required?
 InitWatchdog();      // Initialize the Watchdog Timer (FILE: WatchDog.c)  Again - is this still required?

//--- Copy all Flash sections that need to run from RAM (use memcpy() from RTS library)  -- I would assume this is still required...

// Section secureRamFuncs contains user defined code that runs from CSM secured RAM
 memcpy(&secureRamFuncs_runstart, &secureRamFuncs_loadstart, (Uint32)&secureRamFuncs_loadsize);

//--- Initialize the Flash and OTP  -- again, I would assume this is still required...
 InitFlash();      // Initialize the Flash (FILE: Flash.c)

//--- Peripheral Initialization -- I would assume this is still required, for each peripheral being used.
 InitAdc();       // Initialize the ADC (FILE: Adc.c)
 InitEPwm();       // Initialize the EPwm (FILE: EPwm.c)
 InitECap();       // Initialize the ECap (FILE: ECap.c)
 InitDma();       // Initialize the DMA (FILE: Dma.c)

//--- Enable global interrupts
         // DSP/BIOS will enable global interrupts (INTM and DBGM)

//--- Main Loop
         // while() loop removed to enable DSP/BIOS


} //end of main()

  • Todd,

    This really just depends on what SYS/BIOS modules you have included.  I'll go through each line above:

     InitSysCtrl();      // Initialize the CPU (FILE: SysCtrl.c)   Question: Is this still required with SYS/BIOS?

    >> If you are using the boot module most of the stuff in here isn't required.  The boot module will setup the PLL and watchdog, but it will not setup the peripheral clocks, so you'll still need to do that.


     InitGpio();       // Initialize the shared GPIO pins (FILE: Gpio.c) - I can only assume that this is still required...  

    >> Yes SYS/BIOS doesn't configure GPIOs.  That is your responsibility.


     InitPieCtrl();      // Initialize and enable the PIE (FILE: PieCtrl.c)  Question:  Is this still required?

    >> If you are including any of the HWI management modules this call isn't required.  BIOS will manage everything related to interrupts.


     InitWatchdog();      // Initialize the Watchdog Timer (FILE: WatchDog.c)  Again - is this still required?

    >>Not if you are using the boot module.

     memcpy(&secureRamFuncs_runstart, &secureRamFuncs_loadstart, (Uint32)&secureRamFuncs_loadsize);

    >> Still needed.  BIOS has no way to know what functions are in RAM and what are in flash...let alone the section they belong to and any variables used for copying.

    InitFlash();      // Initialize the Flash (FILE: Flash.c)

    >> I believe BIOS will setup flash wait states for you, but I'm not entirely sure.  You may have to ask this in the BIOS forum or do a quick check yourself to see if they are being setup appropriately.

     InitAdc();       // Initialize the ADC (FILE: Adc.c)
     InitEPwm();       // Initialize the EPwm (FILE: EPwm.c)
     InitECap();       // Initialize the ECap (FILE: ECap.c)
     InitDma();       // Initialize the DMA (FILE: Dma.c)

    >> All these calls are still needed.  BIOS doesn't touch peripherals.


    Trey


  • Trey:

    Can you post your example code? It looks pretty thorough and may be a good starting point for further work...

  • Sir I am a student of TI MCU's. i have studied the 1 day workshop provided by TI-TTO. I have also studied the serial "echoback" peripheral example  for SARAM in peripheral examples v131. But I want to run that on internal flash on ezdsp 28335. can u guide me step by step

  • If you go to http://processors.wiki.ti.com/index.php/C2000_Archived_Workshops#C2000_Delfino_Multi-Day_Workshop_-_Revision_8.1_November_2010_.28ExpKit_F28335.3B_CCSv4.2.3B_DSP.2FBIOS_5.41.29

    you will find an archived 3-day workshop for the F28335 - there is a module that shows how to place the workshop code into flash memory. Hopefully, that helps.