I can configure the McBSP0 as GPIO and read status in C5510 DSK using following codes: (I add the code in the example program: CCStudio_v3.1\examples\dsk5510\bsl\led, led project)
hMcbsp0 = MCBSP_open(MCBSP_PORT0,MCBSP_OPEN_RESET);
MCBSP_RSETH(hMcbsp0,SPCR1,0x0000);
MCBSP_RSETH(hMcbsp0,SPCR2,0x0000);
MCBSP_RSETH(hMcbsp0,PCR,0x3800); //0011 1000 0000 0000
MCBSP_FGETH(hMcbsp0,PCR,CLKRP); // read the CLKR0 status
But it is surprising that I can't not read/write pins of another McBSP---- McBSP1 --- using the same way??? DSP always reads the "0" status of CLKR1 while changing its iuput to high voltage 3.3 V (I delete the code above, only deal with McBSP1)
hMcbsp1 = MCBSP_open(MCBSP_PORT1,MCBSP_OPEN_RESET);
MCBSP_RSETH(hMcbsp1,SPCR1,0x0000);
MCBSP_RSETH(hMcbsp1,SPCR2,0x0000);
MCBSP_RSETH(hMcbsp1,PCR,0x3800); //0011 1000 0000 0000
MCBSP_FGETH(hMcbsp1,PCR,CLKRP); //read the CLKR1 status
Can all the McBSPs be configured as GPIO??? or only McBSP0???