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.

F28377D Delfino debug error -2131

Other Parts Discussed in Thread: CONTROLSUITE

I Was use F28377D debug  examples in support suit ,when i was

debug in RAM Active mode or flash active mode ,its shows debug error report as follow

Error connecting to the target:

(Error -2131 @ 0x0)
Unable to access device register. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
(Emulation package 5.1.507.0)

Thanks !

Yusuf Gürler

  • Hi Yusuf,

    I would suggest you to refer the following workshop material:

    https://processors.wiki.ti.com/index.php/F2837xD_Workshop

    Regards,

    Gautam

  • Hello again,

    I wrote a code that generate pwm signal. But ı want to change pwm period and duty cycle values with real time emulation control. which register should ı enable or disable to do this ?

    Thanks.

  • mrthunderous said:
    I wrote a code that generate pwm signal. But ı want to change pwm period and duty cycle values with real time emulation control. which register should ı enable or disable to do this ?

    You mean you want to change the pwm period and duty while in real time debug mode?

    Regards,

    Gautam

  • While in debug mode, right click inside the watch window -> Global variables -> epwmx

    Once you add the ePWM peripheral that you've enabled to Watch window, by opening the register you'll be able to monitor the TBPRD and CMPA/CMPB values. You can edit duty by editing the CMPA/CMPB values and period by editing TBPRD value.

    Regards,

    Gautam

  • Hello again,

    I have error   #137 union "TBPHS_GROUP" has no field "bit"   

    I want to generate 2 pwm signals. Both of them has similar frequency and duty cycle but  I want that one of them is phase shifted. 

     EPwm5Regs.TBPHS.bit.TBPHS = 0x2000

    ı understand that I can't declerate  properly TBPHS register. How can ı load this register with hex value or decimal value .

    Thanks. 

  • Hi,

    Refer this code:

    0246.Example_2833xEPwmUpAQ.c
    //###########################################################################
    //
    // FILE:    Example_2833xEPwm3UpAQ.c
    //
    // TITLE:   Action Qualifier Module Upcount mode.
    //
    // ASSUMPTIONS:
    //
    //     This program requires the DSP2833x header files.
    //
    //     Monitor the ePWM1 - ePWM3 pins on a oscilloscope as
    //     described below.
    //
    //        EPWM1A is on GPIO0
    //        EPWM1B is on GPIO1
    //
    //        EPWM2A is on GPIO2
    //        EPWM2B is on GPIO3
    //
    //        EPWM3A is on GPIO4
    //        EPWM3B is on GPIO5
    //
    //     As supplied, this project is configured for "boot to SARAM"
    //     operation.  The 2833x Boot Mode table is shown below.
    //     For information on configuring the boot mode of an eZdsp,
    //     please refer to the documentation included with the eZdsp,
    //
    //       $Boot_Table:
    //
    //         GPIO87   GPIO86     GPIO85   GPIO84
    //          XA15     XA14       XA13     XA12
    //           PU       PU         PU       PU
    //        ==========================================
    //            1        1          1        1    Jump to Flash
    //            1        1          1        0    SCI-A boot
    //            1        1          0        1    SPI-A boot
    //            1        1          0        0    I2C-A boot
    //            1        0          1        1    eCAN-A boot
    //            1        0          1        0    McBSP-A boot
    //            1        0          0        1    Jump to XINTF x16
    //            1        0          0        0    Jump to XINTF x32
    //            0        1          1        1    Jump to OTP
    //            0        1          1        0    Parallel GPIO I/O boot
    //            0        1          0        1    Parallel XINTF boot
    //            0        1          0        0    Jump to SARAM	    <- "boot to SARAM"
    //            0        0          1        1    Branch to check boot mode
    //            0        0          1        0    Boot to flash, bypass ADC cal
    //            0        0          0        1    Boot to SARAM, bypass ADC cal
    //            0        0          0        0    Boot to SCI-A, bypass ADC cal
    //                                              Boot_Table_End$
    //
    // DESCRIPTION:
    //
    //    This example configures ePWM1, ePWM2, ePWM3 to produce an
    //    waveform with independant modulation on EPWMxA and
    //    EPWMxB.
    //
    //    The compare values CMPA and CMPB are modified within the ePWM's ISR
    //
    //    The TB counter is in upmode for this example.
    //
    //    View the EPWM1A/B, EPWM2A/B and EPWM3A/B waveforms
    //    via an oscilloscope
    //
    //
    //###########################################################################
    // $TI Release: 2833x/2823x Header Files and Peripheral Examples V133 $
    // $Release Date: June 8, 2012 $
    //###########################################################################
    
    
    #include "DSP28x_Project.h"     // Device Headerfile and Examples Include File
    
    
    
    void main(void)
    {
    // Step 1. Initialize System Control:
    // PLL, WatchDog, enable Peripheral Clocks
    // This example function is found in the DSP2833x_SysCtrl.c file.
       InitSysCtrl();
    
    // Step 2. Initalize GPIO:
    // This example function is found in the DSP2833x_Gpio.c file and
    // illustrates how to set the GPIO to it's default state.
    // InitGpio();  // Skipped for this example
    
    // For this case just init GPIO pins for ePWM1, ePWM2, ePWM3
    // These functions are in the DSP2833x_EPwm.c file
       InitEPwm1Gpio();
       InitEPwm2Gpio();
    
    // Step 3. Clear all interrupts and initialize PIE vector table:
    // Disable CPU interrupts
       DINT;
    
    // Initialize the PIE control registers to their default state.
    // The default state is all PIE interrupts disabled and flags
    // are cleared.
    // This function is found in the DSP2833x_PieCtrl.c file.
       InitPieCtrl();
    
    // Disable CPU interrupts and clear all CPU interrupt flags:
       IER = 0x0000;
       IFR = 0x0000;
    
    // Initialize the PIE vector table with pointers to the shell Interrupt
    // Service Routines (ISR).
    // This will populate the entire table, even if the interrupt
    // is not used in this example.  This is useful for debug purposes.
    // The shell ISR routines are found in DSP2833x_DefaultIsr.c.
    // This function is found in DSP2833x_PieVect.c.
       InitPieVectTable();
    
    // Step 4. Initialize all the Device Peripherals:
    // This function is found in DSP2833x_InitPeripherals.c
    // InitPeripherals();  // Not required for this example
    
    // For this example, only initialize the ePWM
    
       EALLOW;
       SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;
       EDIS;
    
       //InitEPwm1Example();
    
       EALLOW;
       SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 1;
       EDIS;
    
       // EPWM Module 1 config
       EPwm1Regs.TBPRD = 750; // Period = 1201 TBCLK counts
       EPwm1Regs.TBPHS.half.TBPHS = 0; // Set Phase register to zero
       EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UP; // Asymmetrical mode
       EPwm1Regs.TBCTL.bit.PHSEN = TB_DISABLE; // Phase loading disabled
       EPwm1Regs.TBCTL.bit.PRDLD = TB_SHADOW;
       EPwm1Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_DISABLE;
       EPwm1Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW;
       EPwm1Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;
       EPwm1Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO; // load on CTR=Zero
       EPwm1Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO; // load on CTR=Zero
       EPwm1Regs.AQCTLA.bit.PRD = AQ_CLEAR;
       EPwm1Regs.AQCTLA.bit.CAU = AQ_SET;
    
       // EPWM Module 2 config
       EPwm2Regs.TBPRD = 750; // Period = 1401 TBCLK counts
       EPwm2Regs.TBPHS.half.TBPHS = 0; // Set Phase register to zero
       EPwm2Regs.TBCTR = 220;
       EPwm2Regs.TBCTL.bit.CTRMODE = TB_COUNT_UP; // Asymmetrical mode
       EPwm2Regs.TBCTL.bit.PHSEN = TB_DISABLE; // Phase loading disabled
       EPwm2Regs.TBCTL.bit.PRDLD = TB_SHADOW;
       EPwm2Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_DISABLE;
       EPwm2Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW;
       EPwm2Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;
       EPwm2Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO; // load on CTR=Zero
       EPwm2Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO; // load on CTR=Zero
       EPwm2Regs.AQCTLA.bit.PRD = AQ_CLEAR;
       EPwm2Regs.AQCTLA.bit.CAU = AQ_SET;
    
       EPwm1Regs.CMPA.half.CMPA = 375; // adjust duty for output EPWM1A
       EPwm2Regs.CMPA.half.CMPA = 375; // adjust duty for output EPWM2A
    
    
    // Step 6. IDLE loop. Just sit and loop forever (optional):
       for(;;)
       {
    
       }
    
    }
    
    
    

    Esp. this setting : EPwm2Regs.TBCTR = 220;

    Regards,

    Gautam

  • Hi,

    I have got F28377 delphino kit. I want to stored data in SD card using SD card slot. How can ı do this?

    Regards,

     

  • You can refer the code mentioned here: C:\ti\controlSUITE\device_support\F2837xD\v110\F2837xD_examples_Cpu1\usb_host_msc\cpu01

    Regards,

    Gautam

  • Hi,

    I have got a simulink model to my project. I have got F28377D. How can ı convert my model to c code.

    Regards,