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 dsp/bios configuration



hi, 

i`m try to make a simple program using dsp/bios configuration that use one gpio, so when i compile the c code an error apears that says about definitions (GpioCtrlReg,Edis, Eallow.) so i need to use the headers files. In my case dsp2833x_device.h but when i compile  a warning apears and 2 errors about the definition (GpioCtrlReg). I read the quick start guide so :

What do i need to add to my program? What headers? 

i`m new in this so if you can be more specific.

When i use dsp/bios configuration a .cmd is generate so i guess i don`t need to use dsp2833x_headers_bios.cmd. 

  • well, i see some examples in spr530, toggle gpio, so i see the source that use in the example and put it in my program.

    when i put the next sources:

    dsp2833x_CodeStartBranch.asm

    dsp2833x_CpuTimer.c

    dsp2833x_DefaultIsr.c

    dsp2833x_GlobalVariableDefs.c

    dsp2833x_MemCopy.c

    dsp2833x_PieCtrl.c

    dsp2833x_PieVect.c

    dsp2833x_usDelay.asm

    when i compile i guet the next warnings:

     warning: typedef name has already been declared (with same type)

     warning: typedef name has already been declared (with same type)

     warning: creating output section codestart without SECTIONS specification

     warning: creating output section ramfuncs without SECTIONS specification

    I check the build options and it seems ok to me. 

    If i use the bios. cmd i get a lot of errors.

     

  • It seems that the linker created by DSP/Bios (ProjectNamecfg.cmd) and the one included in the examples are different. I was able to to use the DSP/Bios by disabling PieCtrl and PieVect. However, I am completely lost on how to get DSP/Bios to recognize HWI. All the examples have hard coded interrupts.

    Links to app notes on how to implement a peripheral HWI ( like adc or pwm) with DSP/BIOS would be extremely helpful....Thanks.

     

     

  • iigruntii said:

    It seems that the linker created by DSP/Bios (ProjectNamecfg.cmd) and the one included in the examples are different. I was able to to use the DSP/Bios by disabling PieCtrl and PieVect. However, I am completely lost on how to get DSP/Bios to recognize HWI. All the examples have hard coded interrupts.

    Links to app notes on how to implement a peripheral HWI ( like adc or pwm) with DSP/BIOS would be extremely helpful....Thanks.

    Actually, this is an example which is demonstrated in the TMS320C28x 3-day Workshop.  Specifically Lab 12 provides an illustration of this.  I would agree an application note, or MediaWiki topic would be beneficial.

    The key thing to note is DSP/BIOS will need you to use the HWI Dispatcher.  Within the DSP/BIOS configuration tool, expand the HWI - Hardware Interrupt Service Routine Manager and expand the PIE Interrupts.  Right click on the specific PIE Interrupt and select Properties.  Select the Dispatcher tab and click "Use Dispatcher".  You will also need to remove the "interrupt" key word from the Interrupt Service Routine, as this will now be handled by the HWI Dispatcher.

    In addition, there is information in the TMS320 DSP/BIOS User's Guide (SPRU423) and TMS320C28x DSP/BIOS 5.32 Application Programming Interface (API) Reference Guide (SPRU625).
    Also, another valuable resource is on the following MediaWiki site.

  • I eventually was able to get the DSP/BIOS working with the example projects and libraries supplied by TI.  You will need to re-map the memory in the *.cmd file. DSP/BIOS clumps memory into sections called L03SARAM, L47SARAM, etc. These values overlap the memory allocation in project examples RAM0, RAM1, etc. You will need to get out the datasheet for your DSP and remap the memory according.  Good Luck.

    It is a shame that TI does not post that education material somewhere for everyone to use. Seems counter intuitive, from a sale's point of view, to have customers pay for better documentation on how to use a product. That was not an attack on you Brandon, I really appreciate you taking the time to respond to my questions. I am sure that I will post here again in the near future.

     

  • Grant said:

    It is a shame that TI does not post that education material somewhere for everyone to use. Seems counter intuitive, from a sale's point of view, to have customers pay for better documentation on how to use a product. That was not an attack on you Brandon, I really appreciate you taking the time to respond to my questions. I am sure that I will post here again in the near future.

    I agree with your point and we are working on making materials more readily available.  In researching your issue, I had found this example in the workshop.

  • The following is a simple program I am using to test HWI using the DSP/BIOS.  I have pasted my main program loop "control.c". Not shown are the major modifications to the CMD files that eliminate memory collisions with that assigned in TI’s example package and the DSP/Bios. The program should blinks two LEDS. One blinks using the PRD object in the DSP/BIOS the other is a HWI triggered with TIMER0. The BIOS LED blinks but not the HWI LED. The HWI never fires. I have disabled InitPieVecTable() because I believe this is taken care of using the PIE interrupts listed in the DSP/BIOS Config=>Scheduling=>HWI Service Routine Manager. Is this a correct assumption? What else do I need to do to get the BIOS to recognize the HWI? I am using the dispatcher on the item PIE_INT1_7 -- the interrupt for TIMER0. I have also disabled code for TIMER1 and TIMER2 as recommended in DSP2833x_CpuTimers.c, as they are used by the BIOS. Many hours wasted trying to get this working. Your help is greatly appreciated.

    #include "Controlcfg.h"      // Bios generated header file
    #include "DSP28x_Project.h"
    void initializeGPIO();   
    Void timer0();
    Void heartbeat();
    void main()
    {
     LOG_printf(&trace,"Program has entered main.");
     initializeGPIO();
     InitSysCtrl(); // init watchdog, PLL, and peripheral clocks
     InitPieCtrl(); // disable all PIE interrupts disabled and clear flags.
     //InitPieVectTable();
     InitCpuTimers();
     ConfigCpuTimer(&CpuTimer0, 100, 500000);
     IER = 0x0000; // disable CPU interrupts
     IFR = 0x0000; //clear all CPU interrupt flags
     IER |= M_INT1;// Enable CPU INT1 which is connected to CPU-Timer 0:
     PieCtrlRegs.PIEIER1.bit.INTx7 = 1;   // Enable TINT0 in the PIE: Group 1 interrupt 7
     EINT;   // Enable Global interrupt INTM
     ERTM;   // Enable Global realtime interrupt DBGM
    }
    Void timer0()
    {
     GpioDataRegs.GPBTOGGLE.bit.GPIO34=1;
    }
    Void heartbeat()
    {
     GpioDataRegs.GPATOGGLE.bit.GPIO31=1;
     LOG_printf(&trace,"task1 executed.");
    }
    void initializeGPIO()
    {
      blah lah blah
    }

  • Good news. I am now able to see the HWI interrupt, PIE_INT1_7_STS, under the statistics panel.  I needed to start the timer (duh) using StartCpuTimer0(). I will post the final code when I am done.