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.

XINTF Causes Crash?

I have 28335 DSP.  XINTF is setup with these settings:

   XintfRegs.XINTCNF2.bit.XTIMCLK = 1;
   XintfRegs.XINTCNF2.bit.CLKMODE = 1;
   XintfRegs.XINTCNF2.bit.CLKOFF = 0;
    XintfRegs.XINTCNF2.bit.XTIMCLK = 1;
    XintfRegs.XINTCNF2.bit.WRBUFF = 0;
    XintfRegs.XINTCNF2.bit.CLKOFF = 0;
    XintfRegs.XINTCNF2.bit.CLKMODE = 1;
    XintfRegs.XTIMING0.bit.XWRLEAD = 3;
    XintfRegs.XTIMING0.bit.XWRACTIVE = 7;
    XintfRegs.XTIMING0.bit.XWRTRAIL = 3;
    XintfRegs.XTIMING0.bit.XRDLEAD = 3;
    XintfRegs.XTIMING0.bit.XRDACTIVE = 7;
    XintfRegs.XTIMING0.bit.XRDTRAIL = 3;
    XintfRegs.XTIMING0.bit.X2TIMING = 0;
    XintfRegs.XTIMING0.bit.USEREADY = 1;
    XintfRegs.XTIMING0.bit.READYMODE = 1;  // sample asynchronous
    XintfRegs.XTIMING0.bit.XSIZE = 1;
    XintfRegs.XTIMING6.bit.XWRLEAD = 2;
    XintfRegs.XTIMING6.bit.XWRACTIVE = 4;
    XintfRegs.XTIMING6.bit.XWRTRAIL = 2;
    XintfRegs.XTIMING6.bit.XRDLEAD = 2;
    XintfRegs.XTIMING6.bit.XRDACTIVE = 4;
    XintfRegs.XTIMING6.bit.XRDTRAIL = 2;
    XintfRegs.XTIMING6.bit.X2TIMING = 0;
    XintfRegs.XTIMING6.bit.USEREADY = 1;
    XintfRegs.XTIMING6.bit.READYMODE = 1;  // sample asynchronous
    XintfRegs.XTIMING6.bit.XSIZE = 1;
    XintfRegs.XTIMING7.bit.XWRLEAD = 2;//changed from 3 to 2 for testing by vishwa
    XintfRegs.XTIMING7.bit.XWRACTIVE = 4;//changed from 7 to 3 for testing by vishwa
    XintfRegs.XTIMING7.bit.XWRTRAIL = 2;//changed from 3 to 2 for testing by vishwa
    XintfRegs.XTIMING7.bit.XRDLEAD = 2;//changed from 3 to 2 for testing by vishwa
    XintfRegs.XTIMING7.bit.XRDACTIVE = 4;//changed from 7 to 3 for testing by vishwa
    XintfRegs.XTIMING7.bit.XRDTRAIL = 2;//changed from 3 to 2 for testing by vishwa
    XintfRegs.XTIMING7.bit.X2TIMING = 0;
    XintfRegs.XTIMING7.bit.USEREADY = 0;
    XintfRegs.XTIMING7.bit.READYMODE = 0;  // sample asynchronous
    XintfRegs.XTIMING7.bit.XSIZE = 1;
    XintfRegs.XBANK.bit.BANK = 7;
    XintfRegs.XBANK.bit.BCYC = 7;

This sets up for a 32 bit bus.  I then follow the example code for XINTF by setting the cmd file:

   xintffuncs       : LOAD = L01234567SARAM,
                      RUN = ZONE6,
                      LOAD_START(_XintffuncsLoadStart),
                      LOAD_END(_XintffuncsLoadEnd),
                      RUN_START(_XintffuncsRunStart),
                      PAGE = 0

where Zone6 is defined in the DSP Bios configuration file.

 

I then put this is one of my files:

#pragma CODE_SECTION(AngleCheck,"xintffuncs");

 

And in my main:

   MemCopy(&XintffuncsLoadStart, &XintffuncsLoadEnd, &XintffuncsRunStart);

This compiles fine but on entry to the AngleCheck function the program hangs.  I can step into the function but the disassembly shows I am stuck in FXN_F_selfLoop,

 

Any ideas on what I am doing wrong?  Codegen Tools are 5.2.10 and DSP Bios is 5.41.10.36.

 

 

  • Christopher Taylor said:

    This compiles fine but on entry to the AngleCheck function the program hangs.  I can step into the function but the disassembly shows I am stuck in FXN_F_selfLoop,

     

    Christopher,

    There is an errata for the XINTF on that device that can cause the XINTF to hang.   The workaround is to issue a watchdog reset. 

    Please refer to the description in www.ti.com/lit/SPRZ272

    Regards,

    -Lori