嗨对话框:
你能支持一个关于DA14585 IIC DMA的演示吗?
我的电子邮件是卢西恩。kuang@skynoon.com。
我的调试代码如下(无法发送数据):
静态void hw\u dma\u transfer\u回调(void*user\u data,uint16\u t len)
{
arch_printf(“hw_dma_transfer_callback\n”);
}
静态DMA\u设置DMA\u设置\u PDM\u到\u缓冲区;
uint8\u t p\u arr[20]={1','2','3','4','5','6','7',0x55,0x56,0x57,0x58,0x59,0x60,0x61,0x62,0x63,0x64,0x65,};
静态void DMA\u init(void)
{
DMA\u Setup\u for \u PDM\u to \u buffer.channel\u number=DMA\u channel\u 0;
DMA\u Setup\u for \u PDM\u to \u buffer.src\u address=(uint32\u t)p\u arr;
DMA\u Setup\u for \u PDM\u to \u buffer.a\u inc=DMA\u AINC\u FALSE;
DMA\u Setup\u for \u PDM\u to \u buffer.b\u inc=DMA\u BINC\u TRUE;
DMA\设置\用于\ PDM\到\ buffer.bus\宽度=DMA\ BW\字节;
DMA\u Setup\u for \u PDM\u to \u buffer.callback=hw\u DMA\u transfer\u callback;
DMA\u Setup\u for \u PDM\u to \u buffer.DMA\u idle=DMA\u idle\u中断模式;
DMA\ u Setup\ for\ u PDM\ u to\ u buffer.DMA\ u init=DMA\ u init\ u AX\ u BX\ u AY\ u BY;
DMA\u Setup\u for \u PDM\u to \u buffer.DMA\u prio=DMA\u prio \u 3;
DMA\u Setup\u for \u PDM\u to \u buffer.DMA\u req\u mux=DMA\u TRIG\u I2C\u RXTX;
DMA\u Setup\u for \u PDM\u to \u buffer.dreq\u mode=DMA\u dreq\u触发;
DMA\u Setup\u for \u PDM\u to \u buffer.irq\u enable=DMA\u irq\u STATE\u ENABLED;
DMA\u Setup\u for \u PDM\u to \u buffer.user\u data=NULL;
DMA\u Setup\u for \u PDM\u to \u buffer.DMA\u sense=DMA\u sense\u LEVEL\u SENSITIVE;
DMA\u Setup\u for \u PDM\u to \u buffer.circular=DMA\u MODE \u NORMAL;
DMA\u Setup\u for \u PDM\u to \u buffer.dest\u address=I2C\u DATA\u CMD\u REG//(输入缓冲区;
DMA\u Setup\u for \u PDM\u to \u buffer.length=20//PDM\输入\缓冲区\长度;
DMA\u Setup\u for \u PDM\u to \u buffer.irq\u nr\u of \u trans=0;
dma\通道\初始化(&dma\设置\用于\ PDM\到\缓冲区);
}
void dma\u开始(void)
{
//DMA_init(空,20);
dma\信道\启用(dma\设置\用于\ PDM\到\缓冲区。信道\编号,dma\状态\启用);
}
void dma\u停止(void)
{
//假设在DMA\u init之后调用pdm\u mic\u stop
//DMA\为\ PDM\设置\到\缓冲区。通道\号有效
dma\通道\停止(dma\设置\用于\ PDM\到\缓冲区。通道\编号);
}
void test\u DMA\u函数(void)
{
i2c\ eeprom\ init(KX022\地址、i2c\标准、i2c\ 7位\地址、i2c\ 1字节\地址);
DMA_init();
dma_start();
}
你好,卢先宽,
一个本地对话FAE将在联系,以便提供这方面的支持。
谢谢你的对话