RT1xxx: eDMA to read 32bit but write 16

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

RT1xxx: eDMA to read 32bit but write 16

420 次查看
mastupristi
Senior Contributor I

Hello,

I use eDMA to transfer from register to memory.

I need 32bit read access to the register, but I am only interested in the low 16 bits.

How can I populate TCD for such a job?

For example NBYTES field, that is "Number of bytes to be transferred in each service request of the channel", refers to the number of bytes read from the source or written to the destination?

 

best regards

Max

标签 (2)
标记 (2)
0 项奖励
3 回复数

391 次查看
Miguel04
NXP TechSupport
NXP TechSupport

Hi @mastupristi 

You can configure the data transfer size, you will find the register on chapter [i.MX RT1060] 6.5.5.21 TCD Transfer Attributes [SSIZE] and [DSIZE]

However, which 32 bit register are you trying to use? On the SDK could be an example that uses the same peripheral.

Best Regards, Miguel.

0 项奖励

375 次查看
mastupristi
Senior Contributor I

You can configure the data transfer size, you will find the register on chapter [i.MX RT1060] 6.5.5.21 TCD Transfer Attributes [SSIZE] and [DSIZE]

I had thought about it, and haven't tried it yet, but the question in this case is about the NBYTES field of the TCD: NBYTES field, that is "Number of bytes to be transferred in each service request of the channel", refers to the number of bytes read from the source or written to the destination?

I think the SSIZE and DSIZE fields refer only to the type of access we want to use. If SSIZE is 4 bytes and DSIZE is 1 byte, I think a single 32-bit read access is made from the source, and 4 8-bit accesses are made to write to the destination. Correct me if I am wrong

 

However, which 32 bit register are you trying to use?

RESFIFO register of LPADC (on RT1175). I don't know if I can do a 16-bit access to read only the 2 least significant bytes. I don't know if such an access pops the element from the fifo.

 

On the SDK could be an example that uses the same peripheral.

I did not find such an example

 

best regards

Max

0 项奖励

356 次查看
Miguel04
NXP TechSupport
NXP TechSupport

Hi @mastupristi 

Correct, according to the descrpition of the register the NBYTES, the appropriate reads and writes are
performed until the minor byte transfer count has transferred.

I don't know if I can do a 16-bit access to read only the 2 least significant bytes.

You should be able to access the data bits from that register using dma.

Best Regards, Miguel.

0 项奖励