This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28335: The configuration of Mcbsp to SPI interface

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

Hi all:

    The demo code I used is "C2000_SDK\C2000Ware_1_00_03_00\device_support\f2833x\examples\mcbsp_loopback_dma".

   The gpio setting here:

    //GpioCtrlRegs.GPAMUX1.bit.GPIO12 = 3;	    // GPIO12 is MDXB pin
    GpioCtrlRegs.GPAMUX2.bit.GPIO24 = 3;	    // GPIO24 is MDXB pin
    //GpioCtrlRegs.GPAMUX1.bit.GPIO13 = 3;	    // GPIO13 is MDRB pin
    GpioCtrlRegs.GPAMUX2.bit.GPIO25 = 3;	    // GPIO25 is MDRB pin
    //GpioCtrlRegs.GPAMUX1.bit.GPIO14 = 3;	    // GPIO14 is MCLKXB pin
    GpioCtrlRegs.GPAMUX2.bit.GPIO26 = 3;	    // GPIO26 is MCLKXB pin
    GpioCtrlRegs.GPAMUX1.bit.GPIO3 = 3;		    // GPIO3 is MCLKRB pin
    //GpioCtrlRegs.GPBMUX2.bit.GPIO60 = 1;	    // GPIO60 is MCLKRB pin
    //GpioCtrlRegs.GPAMUX1.bit.GPIO15 = 3;	    // GPIO15 is MFSXB pin
    GpioCtrlRegs.GPAMUX2.bit.GPIO27 = 3;	    // GPIO27 is MFSXB pin
    GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 3;		    // GPIO1 is MFSRB pin
    //GpioCtrlRegs.GPBMUX2.bit.GPIO61 = 1;	    // GPIO61 is MFSRB pin
.

1.    I am confused with the  MFSXB and  MFSRB. They are two pins and I think the function of these pins is "pin select" in spi protcol which "CS". Can I use just one pin as "CS"?

2.    The CLK pin, it should be provided by SPI master but in Mcbsp, it has two clock, ans I find they can be internally connected in clock stop mode which means I can use one pin as CLK?

Thanks

Li

  • Hi Li,

    1.    I am confused with the  MFSXB and  MFSRB. They are two pins and I think the function of these pins is "pin select" in spi protcol which "CS". Can I use just one pin as "CS"?

    When the McBSP module is configured in SPI mode, the transmit frame-synchronization signal (FSX) is used as the slave-enable signal (SPISTE) [or CS if you prefer]. The receive frame-synchronization signal (FSR) is not used in the clock stop mode because this signal is internally connected to its transmit counterpart, CLKX and FSX. That being said, you should be able to use the MFSXB as the CS pin.

    2.    The CLK pin, it should be provided by SPI master but in Mcbsp, it has two clock, ans I find they can be internally connected in clock stop mode which means I can use one pin as CLK?

    Yes, in this case you can use MCLKXB as the CLK pin.

    Best Regards,

    Marlyn

  • Thank you for replying.