I want to config Mcbsp0 in I/O mode on the 6474EVM board.
Now the registers of Mcbsp0 as follows:
1.PCR=0X00003F00
Setting PCR.13 (XIOEN) equal to '1'
Setting PCR.12 (RIOEN) equal to '1'
Setting PCR.11 (FSXM) equal to '1'
Setting PCR.10 (FSRM) equal to '1'
Setting PCR.9 (CLKXM) equal to '1'
Setting PCR.8 (CLKRM) equal to '1'
2.SPCR=0X02001000
XRST=RRST=0;
I think the Mcbsp0 pins should work as GPIO after reading ch 10 of the McBSP Guide
I use the code to test
outData = 1;
CSL_mcbspIoWrite(hMcbsp, CSL_MCBSP_IO_CLKX, outData);
outData = 0;
CSL_mcbspIoWrite(hMcbsp, CSL_MCBSP_IO_CLKX, outData);
It looks CLKX works as gpio when I watch PCR.1
when I use this code to test FSX, DX ,these pins do not change,for PCR.3,PCR.5 do not change.
When I use the code
inMask = CSL_MCBSP_IO_CLKX;
inData = CSL_mcbspIoRead(hMcbsp, inMask);
if ((inData & CSL_MCBSP_IO_CLKX) != 0)
clkx_data = 1;
else
clkx_data = 0;
CCS can not debug in the if and else.
I aslo try this way:
*(unsigned char*) McBSP0_PCR_Address |= ((1 << 13) | (1 << 12) | (1 << 11) | (1 << 10 ) | (1 << 8));
*(unsigned char*) McBSP0_PCR_Address |= ((1 << 3) | (1 << 2) | (1 << 0)) ;
The PCR value does not change.
could you help me solve the problem,thank you very much.