都是配成的01
MCBSP_SPCR1_RMK(
MCBSP_SPCR1_DLB_OFF, /* DLB = 0,禁止自闭环方式 */
//MCBSP_SPCR1_DLB_ON,
MCBSP_SPCR1_RJUST_LZF, /* RJUST = 2 */
//3,
//MCBSP_SPCR1_CLKSTP_DISABLE, /* CLKSTP = 0 */
2,
MCBSP_SPCR1_DXENA_ON, /* DXENA = 1 */
0, /* ABIS = 0 */
MCBSP_SPCR1_RINTM_RRDY, /* RINTM = 0 */
0, /* RSYNCER = 0 */
MCBSP_SPCR1_RRST_DISABLE /* RRST = 0 */
),
MCBSP_SPCR2_RMK(
MCBSP_SPCR2_FREE_NO, /* FREE = 0 */
MCBSP_SPCR2_SOFT_NO, /* SOFT = 0 */
MCBSP_SPCR2_FRST_FSG, /* FRST = 0 */
MCBSP_SPCR2_GRST_CLKG, /* GRST = 0 */
//1,
MCBSP_SPCR2_XINTM_XRDY, /* XINTM = 0 */
0, /* XSYNCER = N/A */
MCBSP_SPCR2_XRST_DISABLE /* XRST = 0 */
),
/*单数据相,接受数据长度为16位,每相2个数据*/
MCBSP_RCR1_RMK(
//MCBSP_RCR1_RFRLEN1_OF(1), /* RFRLEN1 = 1 */
2,
MCBSP_RCR1_RWDLEN1_8BIT /* RWDLEN1 = 2 */
),
MCBSP_RCR2_RMK(
MCBSP_RCR2_RPHASE_SINGLE, /* RPHASE = 0 */
MCBSP_RCR2_RFRLEN2_OF(0), /* RFRLEN2 = 0 */
MCBSP_RCR2_RWDLEN2_8BIT, /* RWDLEN2 = 0 */
MCBSP_RCR2_RCOMPAND_MSB, /* RCOMPAND = 0 */
MCBSP_RCR2_RFIG_YES, /* RFIG = 0 */
MCBSP_RCR2_RDATDLY_1BIT /* RDATDLY = 1 */
),
MCBSP_XCR1_RMK(
//MCBSP_XCR1_XFRLEN1_OF(1), /* XFRLEN1 = 1 */
2,
MCBSP_XCR1_XWDLEN1_8BIT /* XWDLEN1 = 2 */
),
MCBSP_XCR2_RMK(
MCBSP_XCR2_XPHASE_SINGLE, /* XPHASE = 0 */
MCBSP_XCR2_XFRLEN2_OF(0), /* XFRLEN2 = 0 */
MCBSP_XCR2_XWDLEN2_8BIT, /* XWDLEN2 = 0 */
MCBSP_XCR2_XCOMPAND_MSB, /* XCOMPAND = 0 */
MCBSP_XCR2_XFIG_YES, /* XFIG = 0 */
MCBSP_XCR2_XDATDLY_1BIT /* XDATDLY = 1 */
),
//MCBSP_SRGR1_DEFAULT,
MCBSP_SRGR1_RMK(
0,
50
),
MCBSP_SRGR2_DEFAULT,
MCBSP_MCR1_DEFAULT,
MCBSP_MCR2_DEFAULT,
MCBSP_PCR_RMK(
MCBSP_PCR_IDLEEN_RESET, /* IDLEEN = 0 */
//MCBSP_PCR_XIOEN_GPIO, /* XIOEN = 1 */
0,
//MCBSP_PCR_RIOEN_GPIO, /* RIOEN = 1 */
0,
//MCBSP_PCR_FSXM_EXTERNAL, /* FSXM = 0 */
1,
//MCBSP_PCR_FSRM_EXTERNAL, /* FSRM = 0 */
1,
//MCBSP_PCR_CLKXM_INPUT, /* CLKXM = 0 */
1,
//MCBSP_PCR_CLKRM_INPUT, /* CLKRM = 0 */
1,
MCBSP_PCR_SCLKME_NO, /* SCLKME = 0 */
MCBSP_PCR_DXSTAT_1, /* DXSTAT = 1 */
//MCBSP_PCR_FSXP_ACTIVEHIGH, /* FSXP = 0 */
1,
MCBSP_PCR_FSRP_ACTIVEHIGH, /* FSRP = 1 */
//MCBSP_PCR_CLKXP_FALLING, /* CLKXP = 1 */
0,
MCBSP_PCR_CLKRP_RISING /* CLKRP = 1 */
),
MCBSP_RCERA_DEFAULT,
MCBSP_RCERB_DEFAULT,
MCBSP_RCERC_DEFAULT,
MCBSP_RCERD_DEFAULT,
MCBSP_RCERE_DEFAULT,
MCBSP_RCERF_DEFAULT,
MCBSP_RCERG_DEFAULT,
MCBSP_RCERH_DEFAULT,
MCBSP_XCERA_DEFAULT,
MCBSP_XCERB_DEFAULT,
MCBSP_XCERC_DEFAULT,
MCBSP_XCERD_DEFAULT,
MCBSP_XCERE_DEFAULT,
MCBSP_XCERF_DEFAULT,
MCBSP_XCERG_DEFAULT,
MCBSP_XCERH_DEFAULT
];
上面是我的配置,是例子改的