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???
Yes. Both should be allowed to configured as GPIO. On the DSK, they are connected to on-board AIC23. Are you changing the CLKR1 on the AIC23? Or the expansion connector pin 33 and rerouted via MISC register in CPLD of DSK?
-------------------------------------------------------------------------------------------------------
Please click the Verify Answer button on this post if it answers your question
--------------------------------------------------------------------------------------------------------
Does DSP pin CLKR1 not connect P2--Peripheral Expansion Connector pin 39 CLKR1 directly????
I only test "McBSP as GPIO" in P2--Peripheral Expansion Connector, not AIC23???
And I also can't not use McBSP2 as GPIO in P3 HPI Expansion Connector??
I only want to add some input to McBSP pins in P2--Peripheral Expansion Connector and test its input status, I need 12 pins configured as GPIO pins
I notice that in order to make McBSP1 buffer work and pass the signal from McBSP pins in P2--Peripheral Expansion Connector, we should make the voltage of pin 1 OE1 and pin 13 OE2 low, i.e, CPLD_EXP_McBSP1n signal should be also low, how can I control the CPLD_EXP_McBSP1n signal???
HI Shanjie: My quick feedback. You may need to pull DC_DET signal low. This is explained in the documentation of the C5510 dsk. http://c5000.spectrumdigital.com/dsk5510/docs/dsk5510_techref.pdfThe DSK also multiplexes the McBSP1 and McBSP2 of on-board or external use. This function is controlled through the CPLD MISC register as you mentioned. McBSP multiplexing need to be select in the external CPLD MISC register mapped in CE1 memory space (0x300000 data memory word address). Regards, Naser
HI Shanjie: My quick feedback.
You may need to pull DC_DET signal low. This is explained in the documentation of the C5510 dsk.
http://c5000.spectrumdigital.com/dsk5510/docs/dsk5510_techref.pdfThe DSK also multiplexes the McBSP1 and McBSP2 of on-board or external use. This function is controlled through the CPLD MISC register as you mentioned. McBSP multiplexing need to be select in the external CPLD MISC register mapped in CE1 memory space (0x300000 data memory word address).
Regards,
Naser