而且DMA的通道里面为什么没有I2S的通道啊,如果没有那怎么配置DMA啊?
照着库函数试着写了一下,但是完全没有反应
PRCMDomainEnable(PRCM_DOMAIN_RFCORE);
PRCMDomainEnable(PRCM_DOMAIN_SERIAL);
PRCMDomainEnable(PRCM_DOMAIN_PERIPH);
PRCMDomainEnable(PRCM_DOMAIN_VIMS);
PRCMDomainEnable(PRCM_DOMAIN_SYSBUS);
PRCMDomainEnable(PRCM_DOMAIN_CPU);
PRCMDomainEnable(PRCM_DOMAIN_SERIAL);
PRCMDomainEnable(PRCM_DOMAIN_PERIPH);
PRCMDomainEnable(PRCM_DOMAIN_VIMS);
PRCMDomainEnable(PRCM_DOMAIN_SYSBUS);
PRCMDomainEnable(PRCM_DOMAIN_CPU);
PRCMPowerDomainOn(PRCM_DOMAIN_RFCORE);
PRCMPowerDomainOn(PRCM_DOMAIN_SERIAL);
PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH);
PRCMPowerDomainOn(PRCM_DOMAIN_VIMS);
PRCMPowerDomainOn(PRCM_DOMAIN_SYSBUS);
PRCMPowerDomainOn(PRCM_DOMAIN_CPU);
PRCMPowerDomainOn(PRCM_DOMAIN_SERIAL);
PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH);
PRCMPowerDomainOn(PRCM_DOMAIN_VIMS);
PRCMPowerDomainOn(PRCM_DOMAIN_SYSBUS);
PRCMPowerDomainOn(PRCM_DOMAIN_CPU);
PRCMPeripheralRunEnable(PRCM_PERIPH_I2S);
PRCMLoadSet();
PRCMPeripheralRunEnable(PRCM_PERIPH_UDMA);
PRCMLoadSet();
PRCMLoadSet();
PRCMPeripheralRunEnable(PRCM_PERIPH_UDMA);
PRCMLoadSet();
PRCMAudioClockEnable();
PRCMAudioClockConfigSet(PRCM_WCLK_DUAL_PHASE|PRCM_WCLK_NEG_EDGE,I2S_SAMPLE_RATE_16K);
// PRCMAudioClockConfigSetOverride(PRCM_WCLK_SINGLE_PHASE|PRCM_WCLK_NEG_EDGE,48000000,16000,1000);
PRCMLoadSet();
PRCMAudioClockConfigSet(PRCM_WCLK_DUAL_PHASE|PRCM_WCLK_NEG_EDGE,I2S_SAMPLE_RATE_16K);
// PRCMAudioClockConfigSetOverride(PRCM_WCLK_SINGLE_PHASE|PRCM_WCLK_NEG_EDGE,48000000,16000,1000);
PRCMLoadSet();
IOCPortConfigureSet(IOID_4,IOC_PORT_MCU_I2S_AD0,IOC_STD_OUTPUT);
IOCPortConfigureSet(IOID_5,IOC_PORT_MCU_I2S_AD1,IOC_STD_INPUT);
IOCPortConfigureSet(IOID_8,IOC_PORT_MCU_I2S_WCLK,IOC_STD_OUTPUT);
IOCPortConfigureSet(IOID_9,IOC_PORT_MCU_I2S_BCLK,IOC_STD_OUTPUT);
IOCPortConfigureSet(IOID_10,IOC_PORT_MCU_I2S_MCLK,IOC_STD_OUTPUT);
IOCPortConfigureSet(IOID_5,IOC_PORT_MCU_I2S_AD1,IOC_STD_INPUT);
IOCPortConfigureSet(IOID_8,IOC_PORT_MCU_I2S_WCLK,IOC_STD_OUTPUT);
IOCPortConfigureSet(IOID_9,IOC_PORT_MCU_I2S_BCLK,IOC_STD_OUTPUT);
IOCPortConfigureSet(IOID_10,IOC_PORT_MCU_I2S_MCLK,IOC_STD_OUTPUT);
uDMAEnable(UDMA0_BASE);
I2SAudioFormatConfigure(I2S0_BASE,I2S_MEM_LENGTH_16|I2S_NEG_EDGE|I2S_DUAL_PHASE_FMT|I2S_WORD_LENGTH_16,1);
I2SChannelConfigure(I2S0_BASE,I2S_LINE_OUTPUT|I2S_STEREO_MODE,I2S_LINE_INPUT|I2S_STEREO_MODE);//??
I2SClockConfigure(I2S0_BASE,I2S_INT_WCLK|I2S_NORMAL_WCLK);
I2SBufferConfig(I2S0_BASE,(uint32_t)InBufBaseA,(uint32_t)OutBufBaseA,200,200);//??
I2SChannelConfigure(I2S0_BASE,I2S_LINE_OUTPUT|I2S_STEREO_MODE,I2S_LINE_INPUT|I2S_STEREO_MODE);//??
I2SClockConfigure(I2S0_BASE,I2S_INT_WCLK|I2S_NORMAL_WCLK);
I2SBufferConfig(I2S0_BASE,(uint32_t)InBufBaseA,(uint32_t)OutBufBaseA,200,200);//??
//
//
//
I2SIntRegister(I2S0_BASE,i2sinterrupt);
I2SIntEnable(I2S0_BASE,I2S_INT_ALL);
I2SIntEnable(I2S0_BASE,I2S_INT_ALL);
I2SEnable(I2S0_BASE);
I2SPointerSet(I2S0_BASE,false,OutBufBaseA);
I2SPointerUpdate(I2S0_BASE,false);
I2SPointerSet(I2S0_BASE,false,OutBufBaseA);
I2SPointerUpdate(I2S0_BASE,false);
有大神会吗?这都搞了好几天了,哎
Seven Han:
您好,
咨询cc1310相关问题,请到无线板块:蓝牙Bluetooth 技术