hi
I have written the following program for dsk6711 to use McBSP1 as
I/O; but when I debug the program by putting a break point at the
end or middle of the for loop,the content of input buffers (like
FSRP) don't change although I change the logical level of the
corresponding input pins. In other word the program read input pins
only once in my program. Why?
Also where can I find more information about DB_CTL0/1 on dsk6711
and the HDL code of its PAL22v10?
thanks
my program is:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <csl_timer.h>
/*-------------------------------
---------*/
/* DSP/BIOS includes */
/*-------------------------------
---------*/
/*-------------------------------
---------*/
//extern far LOG_Obj LogMain;
#include <std.h>
#include <log.h>
#include <swi.h>
#include <sem.h>
#include <clk.h>
/*-------------------------------
---------*/
/* CSL includes */
/*-------------------------------
---------*/
#include <csl.h>
#include <csl_irq.h>
#include <csl_dat.h>
#include <csl_cache.h>
#include <csl_mcbsp.h>
/*-------------------------------
---------*/
/* Application includes */
/*-------------------------------
---------*/
#include "vcap.h"
#include "vdis.h"
#include "img_proc.h"
#pragma DATA_SECTION(ext_mem,".image:ext_sect");
#pragma DATA_SECTION(int_mem,".chip_image:int_sect");
#pragma DATA_ALIGN(ext_mem,8);
#pragma DATA_ALIGN(int_mem, 8);
unsigned char ext_mem[2*576 * 769];
unsigned char int_mem[64000];
static MCBSP_Config ConfigLoopback = {
0x000,
0x000,
0x00000,
0x33fc05ff,
0x0,
0x0,
0x0,
0x1000
};
void main()
{
MCBSP_Handle hMcbsp;
TIMER_Handle hTimer;
volatile Uint32 x,y;
Uint32 PinMask;
int success = 1;
CACHE_flush(CACHE_L2ALL,0,0);
CSL_init();
/* Let's open up serial port 1 */
hMcbsp = MCBSP_open(MCBSP_DEV1, MCBSP_OPEN_RESET);
MCBSP_config(hMcbsp,&ConfigLoopback);
MCBSP_start(hMcbsp,MCBSP_RCV_START | MCBSP_XMIT_START |
MCBSP_SRGR_START| MCBSP_SRGR_FRAMESYNC, MCBSP_SRGR_DEFAULT_DELAY);
/* Now we'll write our program.*/
y=0;
for (x=0;x<10000;x++){
PinMask = MCBSP_getPins(hMcbsp);
if (PinMask & MCBSP_PIN_CLKR)
{
y=y+1;
}
}
PinMask = MCBSP_getPins(hMcbsp);
/* All done now, close the port. */
MCBSP_close(hMcbsp);
}