Aine- > I'm trying to implement a HPI handshake between a windows app and my > c6711dsk. > > I have this working without DSP/BIOS, but I can't get it to work > using DSP/BIOS. One obvious problem is your INT13 vector below has only NOPs -- which means your dsk6x_hpi_generate_int() call is wishful thinking. Another possibility is that DSPINT is not enabled in the IER register. Try reconfiguring DSP/BIOS or patching in some code somewhere that enables INT13. Jeff Brower system engineer Signalogic > This is my dsp code (I'm using the same code for both non-DSP/BIOS > and DSP/BIOS) - > > #define ID_0 0x12345678 > #define ID_1 0xf1f2f3f4 > #define ID_2 0x08070605 > > #pragma DATA_SECTION(handShakingBuffer, "my_DataSect") > int handShakingBuffer[HS_BUFFER_LEN]; > > /* > * ======== main ======== > */ > void main() > { > > handShakingBuffer[0] = ID_0; > handShakingBuffer[1] = ID_1; > handShakingBuffer[2] = ID_2; > handShakingBuffer[3] = 0; > handShakingBuffer[4] = 0; > > return; > } > > Actually, the DSP/BIOS version also includes - > > #include "audiocfg.h" > #include "audio.h" > > My windows app loads the dsp program to the dsp board, and polls > until the following are set - > > handShakingBuffer[0] = ID_0; > handShakingBuffer[1] = ID_1; > handShakingBuffer[2] = ID_2; > > My windows app looks something like the following - > > sBoardFile = "F:\\ti\\c6000\\dsk6x11\\doc\\ti_ppdsk.cfg"; > > pBoardFile = fopen( sBoardFile, "r" ); > fclose(pBoardFile); > dsk6x_open(sBoardFile,&hBd) ) > dsk6x_reset_dsp(hBd,0,1) ) > dsk6x_hpi_open(hBd)) > dsk6x_coff_load(hBd,coffNam,bVerbose,bClr,bDump)) > dsk6x_hpi_generate_int(hBd)) > > do > { > readLength = HS_BUFFER_LEN*4; /* 4 bytes for 1 word */ > /*---------------------------- > ---*/ > /* Test if handShakingBuffer actually read > (completely) */ > /*---------------------------- > ---*/ > > if (!dsk6x_hpi_read(hBd, handShakingBuffer, &readLength, > DSPHS_BUFFER_ADDRESS) || readLength != HS_BUFFER_LEN*4) > { /* evm6x_hpi_read() failed */ > continue; // try again > } > > /*---------------------------- > ---*/ > /* Test if handShakingBuffer contains correct > ID */ > /*---------------------------- > ---*/ > > handShakingFlag = 0; // reset hand shaking flag > if(handShakingBuffer[0] != ID_0) > handShakingFlag = 1; > if(handShakingBuffer[1] != ID_1) > handShakingFlag = 1; > if(handShakingBuffer[2] != ID_2) > handShakingFlag = 1; > } while (handShakingFlag == 1); > > The DSP/BIOS version is getting trapped in the while loop, because > the dsp is obviously not setting the handShakingBuffer, or the app is > not reading this buffer correctly. THe non DSP bios version does not > get trapped. > > My non-DSP bios project also includes a vector.asm file - > > * > * TI Proprietary Information > * Internal Data > * > .ref _c_int00 > > .sect "vectors" > RESET_RST: > > mvkl .S2 _c_int00, B0 > mvkh .S2 _c_int00, B0 > B .S2 B0 > NOP > NOP > NOP > NOP > NOP > NMI_RST: > NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > RESV1: > NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > RESV2: > NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT4: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT5: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT6: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT7: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT8: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT9: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT10: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT11: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT12: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT13: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT14: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > > INT15: NOP > NOP > NOP > NOP > NOP > NOP > NOP > NOP > and a cmd file - > > -c > -heap 0x500 > -stack 0x500 /* very large stack for DSP programs. */ > -lrts6201.lib > > MEMORY > { > vecs: o = 00000000h l = 00000200h > I_HS_MEM: o = 00000200h l = 00000020h > IRAM: o = 00000220h l = > 0000FDE0h > > } > > SECTIONS > { > "vectors" > vecs > my_DataSect > I_HS_MEM > .cinit > IRAM > .text > IRAM > .stack > IRAM > .bss > IRAM > .const > IRAM > .data > IRAM > .far > IRAM > .switch > IRAM > .sysmem > IRAM > .tables > IRAM > .cio > IRAM > } > My DSP/BIOS project contains a cdb file, and a cmd file. The cdb file > is not set up to do anything other that to define the chip - c6711 > etc. Is there anything else I should be setting up in the DSP/BIOS > version? > > Thanks, > > Aine. > > This is my cmd file for the DSP/BIOS version, in case it gives any > clues. Thanks. > > /* Do *not* directly modify this file. It was */ > /* generated by the Configuration Tool; any */ > /* changes risk being overwritten. */ > > /* INPUT audio.cdb */ > > /* MODULE PARAMETERS */ > GBL_USERINITFXN = _FXN_F_nop; > > MEM_SEGZERO = MEM_NULL; > MEM_MALLOCSEG = MEM_NULL; > > CLK_TIMEFXN = CLK_F_getshtime; > CLK_HOOKFXN = HWI_F_dispatch; > > PRD_THOOKFXN = FXN_F_nop; > > RTDX_DATAMEMSEG = SDRAM; > > HST_DSMBUFSEG = SDRAM; > > SWI_EHOOKFXN = GBL_NULL; > SWI_IHOOKFXN = GBL_NULL; > SWI_EXECFXN = FXN_F_nop; > SWI_RUNFXN = FXN_F_nop; > > TSK_STACKSEG = MEM_NULL; > TSK_VCREATEFXN = _FXN_F_nop; > TSK_VDELETEFXN = _FXN_F_nop; > TSK_VEXITFXN = _FXN_F_nop; > > IDL_CALIBRFXN = IDL_F_calibrate; > > SYS_ABORTFXN = _UTL_doAbort; > SYS_ERRORFXN = _UTL_doError; > SYS_EXITFXN = _UTL_halt; > SYS_PUTCFXN = _FXN_F_nop; > > /* OBJECT ALIASES */ > _SDRAM = SDRAM; > _PRD_clock = PRD_clock; > _RTA_fromHost = RTA_fromHost; > _RTA_toHost = RTA_toHost; > _HWI_RESET = HWI_RESET; > _HWI_NMI = HWI_NMI; > _HWI_RESERVED0 = HWI_RESERVED0; > _HWI_RESERVED1 = HWI_RESERVED1; > _HWI_INT4 = HWI_INT4; > _HWI_INT5 = HWI_INT5; > _HWI_INT6 = HWI_INT6; > _HWI_INT7 = HWI_INT7; > _HWI_INT8 = HWI_INT8; > _HWI_INT9 = HWI_INT9; > _HWI_INT10 = HWI_INT10; > _HWI_INT11 = HWI_INT11; > _HWI_INT12 = HWI_INT12; > _HWI_INT13 = HWI_INT13; > _HWI_INT14 = HWI_INT14; > _HWI_INT15 = HWI_INT15; > _LNK_dataPump = LNK_dataPump; > _RTA_dispatcher = RTA_dispatcher; > _IDL_cpuLoad = IDL_cpuLoad; > _LOG_system = LOG_system; > _trace = trace; > _IDL_busyObj = IDL_busyObj; > > /* MODULE GBL */ > > SECTIONS { > .vers (COPY): {} /* version information */ > } > > -llnkrtdx.a62 > -ldrivers.a67 /* device drivers support */ > -lbiosi.a62 /* DSP/BIOS support */ > -lrtdx.lib /* RTDX support */ > -lcsl6211.lib > -lrtsbios.a67 /* C and C++ run-time library support */ > > _GBL_CACHE = GBL_CACHE; > > /* MODULE MEM */ > -stack 0x400 > MEMORY { > SDRAM : origin = 0x80000000, len = 0x1000000 > } > /* MODULE CLK */ > SECTIONS { > .clk: { > _CLK_start = _CLK_start6x; > CLK_F_gethtime = CLK_F_getshtime; > CLK_A_TABBEG = .; > *(.clk) > CLK_A_TABEND = .; > CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1; > } > SDRAM > } > _CLK_PRD = CLK_PRD; > _CLK_COUNTSPMS = CLK_COUNTSPMS; > _CLK_REGS = CLK_REGS; > _CLK_USETIMER = CLK_USETIMER; > _CLK_TIMERNUM = CLK_TIMERNUM; > _CLK_TDDR = CLK_TDDR; > > /* MODULE PRD */ > SECTIONS { > .prd: { > PRD_A_TABBEG = .; > /* no PRD objects */ > PRD_A_TABEND = .; > PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32; > } > SDRAM > } > > /* MODULE RTDX */ > _RTDX_interrupt_mask = 0x0; > > /* MODULE HWI */ > SECTIONS { > .hwi_reset: 0x0 {} > } > > /* MODULE SWI */ > SECTIONS { > .swi: { > SWI_A_TABBEG = .; > /* no SWI objects */ > SWI_A_TABEND = .; > SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44; > } > SDRAM > } > > /* MODULE TSK */ > _KNL_swi = 0; > /* MODULE IDL */ > SECTIONS { > .idl: { > IDL_A_TABBEG = .; > *(.idl) > IDL_A_TABEND = .; > IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8; > IDL_A_CALBEG = .; > *(.idlcal) > IDL_A_CALEND = .; > IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8; > } > SDRAM > } > > SECTIONS { > .hwi_vec: { > HWI_A_VECS = .; > *(.hwi_vec) > } align = 0x400 > SDRAM > > .bss: {} > SDRAM > > .far: {} > SDRAM > > .sysdata: {} > SDRAM > > .sysinit: {} > SDRAM > > .mem: {} > SDRAM > > .gblinit: {} > SDRAM > > .trcdata: {} > SDRAM > > .sysregs: {} > SDRAM > > .cinit: {} > SDRAM > > .pinit: {} > SDRAM > > .data: {} > SDRAM > > .const: {} > SDRAM > > .switch: {} > SDRAM > > .cio: {} > SDRAM > > .text: {} > SDRAM > > frt: {} > SDRAM > > .args: fill=0 { > *(.args) > . += 0x4; > } > SDRAM > > .stack: fill=0xc0ffee { > GBL_stackbeg = .; > *(.stack) > GBL_stackend = GBL_stackbeg + 0x400 - 1; > _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7; > _HWI_STKTOP = GBL_stackbeg; > } > SDRAM > > .rtdx_data: {} > SDRAM > > .rtdx_text: {} > SDRAM > > .hst: { > HST_A_TABBEG = .; > _HST_A_TABBEG = .; > *(.hst) > HST_A_TABEND = .; > _HST_A_TABEND = .; > HST_A_TABLEN = (. - _HST_A_TABBEG) / 20; > _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20; > } > SDRAM > > .dsm: {} > SDRAM > > /* RTA_fromHost buffer */ > .hst1: align = 0x4 {} > SDRAM > > /* RTA_toHost buffer */ > .hst0: align = 0x4 {} > SDRAM > > .hwi: {} > SDRAM > > .bios: {} > SDRAM > > .log: { > LOG_A_TABBEG = .; > _LOG_A_TABBEG = .; > *(.log) > LOG_A_TABEND = .; > _LOG_A_TABEND = .; > LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24; > _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24; > } > SDRAM > > .printf (COPY): {} > SDRAM > > /* LOG_system buffer */ > .LOG_system$buf: align = 0x800 fill = 0xffffffff {} > SDRAM > > /* trace buffer */ > .trace$buf: align = 0x1000 fill = 0xffffffff {} > SDRAM > > .pip: { > PIP_A_TABBEG = .; > _PIP_A_TABBEG = .; > *(.pip) > PIP_A_TABEND = .; > _PIP_A_TABEND = .; > PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100; > _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100; > } > SDRAM > > .sts: { > STS_A_TABBEG = .; > _STS_A_TABBEG = .; > *(.sts) > STS_A_TABEND = .; > _STS_A_TABEND = .; > STS_A_TABLEN = (. - _STS_A_TABBEG) / 16; > _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16; > } > SDRAM > > .sys: {} > SDRAM > > } |