Tool/software: Code Composer Studio
According the the mcbsp manual, in several places, you can generate a transmit interrupt even when the mcbsp is in reset. This doesn't appear to work. I am trying to trigger a irq whenever the mcbsp sees an external frame sync. I have xint set to 2, which should do that. If I keep the mcbsp in reset I never get the int. If I let the mcbsp run, I get the int on ever new framesync. So I know my interrupt routine and setup is correct.
I need this to work to allow me to kick off the mcbsp properly after the first frame sync has arrived. This is discussed in other resources, where you keep the mcbsp in reset until after the first frame sync arrives, then you start the mcbsp in the isr and the next frame sync kicks off a data transfer correctly.
Below is my code fragments.
hndlMcbsp2 = MCBSP_open(MCBSP_PORT1, MCBSP_OPEN_RESET);
MCBSP_config(hndlMcbsp2, &mcbspConfig1);
#pragma DATA_SECTION(mcbspConfig1, ".data1")
static MCBSP_Config mcbspConfig1 = {
MCBSP_SPCR1_RMK(
MCBSP_SPCR1_DLB_OFF,
MCBSP_SPCR1_RJUST_RZF, //MCBSP_SPCR1_RJUST_LZF,
MCBSP_SPCR1_CLKSTP_DISABLE,
MCBSP_SPCR1_DXENA_NA,
MCBSP_SPCR1_ABIS_DISABLE,
MCBSP_SPCR1_RINTM_FRM,
0,
MCBSP_SPCR1_RRST_DISABLE
),
MCBSP_SPCR2_RMK(
MCBSP_SPCR2_FREE_YES,
MCBSP_SPCR2_SOFT_YES,
MCBSP_SPCR2_FRST_RESET, //MCBSP_SPCR2_FRST_FSG
MCBSP_SPCR2_GRST_RESET, //MCBSP_SPCR2_GRST_CLKG
MCBSP_SPCR2_XINTM_FRM, //MCBSP_SPCR2_XINTM_XRDY
0,
MCBSP_SPCR2_XRST_DISABLE
),
MCBSP_RCR1_RMK(
MCBSP_RCR1_RFRLEN1_OF(15), //(1)(7)
MCBSP_RCR1_RWDLEN1_16BIT //MCBSP_RCR1_RWDLEN1_16BIT
),
MCBSP_RCR2_RMK(
MCBSP_RCR2_RPHASE_SINGLE,
MCBSP_RCR2_RFRLEN2_OF(0),
MCBSP_RCR2_RWDLEN2_8BIT,
MCBSP_RCR2_RCOMPAND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