Hi, I'm trying to get my c6711dsk to interrupt my windows based app. I need to do this in order to inform the PC that a buffer of data is ready for it. Am I right in saying that the following is correct with regard to the DSP side - if(count=24) { // copy floating point data to transferBuffer - PING/PONG memcpy(transferBuffer,tempTransferBuffer,1024*4); // interrupt host HPI_setHint(); } But how should things look on the host side? I am currently able to read the transferBuffer from the host side, but I'd like to do this using an interrupt instead of polling. This is a very stipped down version of the code I'm using at the moment to read from the buffer once - #include "dsk6x11hpi.h" dsk6x_open(sBoardFile,&hBd); dsk6x_reset_board(hBd) dsk6x_reset_dsp(hBd,0,1) dsk6x_hpi_open(hBd) EMIFSetUP(); //My function dsk6x_coff_load(hBd,(char *)lpszPathName,bVerbose,bClr,bDump)) ReadHPI(dataPtr,transferBufferAddress,length,FALSE); //My function calling dsk6x_hpi_read The problem is, I need to continuously send data from the DSP to the PC, and this means that the host is contantly polling the dsp to see if a new buffer is available. This is not effiecent programming, and there is a risk that if the PC is loaded heavily that I might miss some of the buffers that the DSP is attempting to transfer. Hope you can help, Aine. |
|
hpi interrupt of host on c6711dsk
Aine- > I'm trying to get my c6711dsk to interrupt my windows based app. I > need to do this in order to inform the PC that a buffer of data is > ready for it. > > Am I right in saying that the following is correct with regard to the > DSP side - > > if(count=24) > { > // copy floating point data to transferBuffer - PING/PONG > memcpy(transferBuffer,tempTransferBuffer,1024*4); > // interrupt host > HPI_setHint(); > } > > But how should things look on the host side? I think the issue ur going to find is that you need an interrupt back from the parallel port, since that's the physical interface ur talking about when u use the DSK host API. So how are you going to set that up? Can the logic on the DSK board cause that interrupt based on HINT line from HPI port? I have a doubt, since printers don't normally work that way and the TI logic and board design would have to do something special. Maybe using ECP mode it's possible, but I think the DSK wants to see EPP mode. What you might try is to simulate the situation -- create a background thread that polls HINT bit every so often (5 msec?) and causes an event in your application. 5 msec response time is about the best u might expect in Win32 anyway, so it might work out Ok. -Jeff > I am currently able to > read the transferBuffer from the host side, but I'd like to do this > using an interrupt instead of polling. This is a very stipped down > version of the code I'm using at the moment to read from the buffer > once - > > #include "dsk6x11hpi.h" > > dsk6x_open(sBoardFile,&hBd); > dsk6x_reset_board(hBd) > dsk6x_reset_dsp(hBd,0,1) > dsk6x_hpi_open(hBd) > EMIFSetUP(); //My function > dsk6x_coff_load(hBd,(char *)lpszPathName,bVerbose,bClr,bDump)) > ReadHPI(dataPtr,transferBufferAddress,length,FALSE); //My function > calling dsk6x_hpi_read > > The problem is, I need to continuously send data from the DSP to the > PC, and this means that the host is contantly polling the dsp to see > if a new buffer is available. This is not effiecent programming, and > there is a risk that if the PC is loaded heavily that I might miss > some of the buffers that the DSP is attempting to transfer. > > Hope you can help, > > Aine. |
|
Aine,
Jeff is correct - the logic on the 6711DSK is a passive slave to the
parallel port and requires polling... Follow Jeff's suggestion for
the results that you are looking for.
mikedunn
Jeff Brower <j...@signalogic.com> wrote: Aine- |