DMA服务于两个SRC信道吗

⚠️
你好。。谢谢你来参加论坛。令人兴奋的消息!我们现在正在移动到我们的新论坛平台,将提供更好的功能,并包含在主对话网站的过程。所有帖子和账号都已迁移。我们现在只接受新论坛上的流量-请在//www.xmece.com/support. 我们将在未来几天内修复bug/优化搜索和标记。
4个职位/0个新职位
最后一篇文章
mlu
离线
最后一次见到:1年4个月前
已加入:2017-02-14 04:30
DMA服务于两个SRC信道吗

我正在为DA14681/SDK1.0.8编写APU驱动程序代码,因为SDK1.0.8还没有准备好相关的代码。
我的目标是路由两个PMC/I2channels:PCM1_IN1[31-8],PCM1\u IN2[31-8]到两个SRC信道SRC\u IN1,
SRCèIN2,然后通过SRC硬件输出到两个SRC输出channels:SRC_OUT1_REG[]/SRC\u OUT2\u REG[],
然后路由两个SRC输出channels:SRC_OUT1_REG[]/SRC\u OUT2\u REG[]到DMA通道。
I read through DA14681 Datasheet Rev. 2.1(15-July-2016) and have questions here:
1) Does DMA support both SRC channels?

from Page 95 of 460,
“20.1.1 I/O通道
The SRC block converts two 24 bits channels either as
一对立体声或两个单声道。PCM线性
数据对在SRC\ u IN上接收,输出为
2x24 bits left aligned on SRC_OUT",
表示SRC支持两个通道;根据“图56:采样率转换器框图”,我们有两个通道寄存器:
PCM_IN1[]、PCM_IN2[]、SRC_IN1_REG[]、SRC_IN2_REG[]、SRC_OUT1_REG、SRC_OUT2_REG

从第74页(共460页)“表29:DMA服务外设”中可以看出,服务外设包括PCM RX/TX、SRC RX/TX,但是
没有明确指出两个PCM,SRC通道。

从第426页(共460页),“表756:DMA\ U REQ\ U MUX\ U REG(0x50003580)”,似乎只有一个DMA信道用于SRC\ U TX,
所以我想知道如何将两个SRC信道都馈送到一个DMA信道,或者它一次只支持一个SRC信道映射到一个DMA信道。

from code "hw_dma.h"
typedef枚举{
硬件DMA触发SPI RXTX=0x0,
HW_DMA_TRIG_SPI2_RXTX = 0x1,
硬件DMA触发器RXTX=0x2,
硬件DMA触发UART2 RXTX=0x3,
硬件DMA触发I2C RXTX=0x4,
硬件DMA触发I2C2 RXTX=0x5,
HW_DMA_TRIG_USB_RXTX = 0x6,
HW\u DMA\u TRIG\u I2S\u LEFTRIGHT=0x8,
HW\u DMA\u TRIG\u PDM\u LEFTRIGHT=0x9,
硬件DMA触发FTDF RXTX=0xA,
HW_DMA_TRIG_ECC_RXTX = 0xB,
HW_DMA_TRIG_ADC = 0xC,
HW_DMA_TRIG_NONE = 0xF
} HW_DMA_TRIG;

I2S_LEFTRIGHT,PDM_LEFTRIGHT表示两个信道,但不知道如何将两个信道馈送到一个DMA信道中,PDM是否表示
SRC也是?或者仅仅意味着PDM?

2) 一个相关的问题,因为PCM和SRC有两个通道,如上所述,
from page 431 of 460, " Table 767: APU_MUX_REG (0x5000401C) ",
位模式符号描述复位
6 R/W PDM1_MUX_IN PDM1 input mux
0 = SRC1_MUX_IN
1 = PDM input

PCM1输入MUX中的5:3 R/W PCM1\U MUX\U
0=关
1=SRC1输出
2 = PCM output registers

2:0 R/W SRC1\u MUX\u IN SRC1 input MUX
0=关
1=PCM输出
2=SRC1输入寄存器
这张桌子让我很困惑,
1) bit 2:0, set to 1 to route PCM output to SRC input?
但从第95页(共460页)的“图56:采样率转换器框图”中可以看出,将PCMèIN1/PCMèIN2路由到SRCèIN2,

2) bit 5:3, set to 1 to route to SRC1 output, set to 2 to route to PCM output register,
同样,在第95页(共460页)“图56:采样率转换器框图”中,它表示路由SRC\u OUT1到SRC\u OUT1\u REG或到PCM\u OUT

如果我的描述也让人困惑,那么换言之,我想实现PCM\ U到USB的场景:
from "Table 44: Typical SRC use cases " fr Page 96
描述。以及
how do I config APU_MUX_REG to route both channel PCM_IN1_DATA--> SRC_OUT1_REG, PCM_IN2_DATA--> SRC_OUT2_REG seperately?

Keywords:
Device:
MT\u对话框
离线
最后一次见到:2 months 2 weeks ago
工作人员
已加入:2015-06-08 11:34
你好,mlu,

你好,mlu,

是的,DMA支持两个SRC通道(它的一个模块支持两个通道,这就是为什么数据表在DMA部分只指出一个SRC),但是由于SDK端没有实现,因此没有合适的枚举,您必须分配两个SRC输出,SRC\u OUT1和SRC\u OUT2连接到DMA的不同通道,两个不同的通道,两个RX/TX对,只使用RX。

Regarding the second question:

1) Yes, bit 2:0 set to 1 will route the both of the channels of the PCM output directly to the SRC.

2) SRC输出可以直接路由到PCM,也可以通过SRC\ U OUT1\ U REG或SRC\ U OUT2\ U REG获得输出。

3) 为了将PCM的两个输出通道通过SRC路由到DMA APU\U MUX\U REG,您应该将位2:0 SRC1\U MUX\U In配置为1=PCM输出(这将配置PCM的输出以用作SRC中的输入)。

谢谢你的对话

mlu
离线
最后一次见到:1年4个月前
已加入:2017-02-14 04:30
您好!

您好!
Thanks for the response. it is good to be confirmed that DMA support both SRC channels.
有些事情可能需要进一步澄清:
1. Could you explain a bit more on your description:" two RX/TX pair and use only the RX"
and if I set DMA_REQ_MUX_REG (0x50003580) to 0x09, then It will route SRC_OUT1_REG to DMA channel 0, and SRC_OUT2_REG to DMA channel 1. ( and nothing related 'tx'), right?
2关于第二个问题,我可能没有正确理解:您对“PCM输出直接到SRC”的描述是否意味着SRC从PCM\u DATA\u的pin/gpio中获取输入?
( in datasheet, Figure 56 says PCM_IN1[31‐8], PCM_IN2[31‐8], but in Table 767: APU_MUX_REG (0x5000401C), it says PCM output which may be related as PCM_DATA_OUT pin/gpio)

2'如果我将APU\U MUX\U REG(0x5000401C)设置为0x09(00001001b),我应该能够从PCM\U DATA\U IN引脚获得SRC输入,并将SRC输出到SRC\U OUT1\U REG/SRC\U OUT2\U REG,对吗?

Thanks,

卢明乐

MT\u对话框
离线
最后一次见到:2 months 2 weeks ago
工作人员
已加入:2015-06-08 11:34
你好,mlu,

你好,mlu,

1. By means of "Two Rx/Tx pairs and use only the Rx", the following is meant:

  1. 您需要将DMA_REQ_MUX_REG.DMA01_SEL编程为0x9(SRC),并对DMA23_SEL执行相同的操作(前提是您将选择信道对0/1、2/3)
  2. 然后,在分别对这些通道的所需寄存器进行编程之后,您将只需要打开“Rx”通道(通过设置DMAx\u CTRL\u REG的“DMA\u on”位字段),这意味着通道0(对于0/1对)和通道2(对于2/3对)。

For channel 0, the start address will be the one of SRC1_OUT1_REG and for channel 2, the start address will be the one of SRC1_OUT2_REG. By this way, you will have both channels 0 and 2 getting the same SRC request signal, and therefore you will be able to track the stereo samples. You don't need the "Tx" channels of the two pairs(1/3), so you should not switch them on (you don't even need to program their respective registers).

2. For this, you need only to configure one of the selected GPIOs to PCM_DI mode (input) and based on the PCM configuration, the incoming data should be placed into the PCM1_IN1_REG and PCM1_IN2_REG. These should be driven to SRC input mux by programming APU_MUX_REG.SRC_IN_MUX to 0x1 (selecting PCM output).

你不需要改变APU_MUX_REG。PCM1_MUX_IN, if you just want to get the SRC1_OUT1/2_REG output samples and store them to memory. You only need to do that if you again need to output the SRC output samples through the PCM again to another GPIO. Only in that case will you need to set APU_MUX_REG to 0x9. If you just want to store the SRC output samples to memory, APU_MUX_REG should be just set to 0x1.

谢谢你的对话