RT1xxx: eDMA to read 32bit but write 16

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT1xxx: eDMA to read 32bit but write 16

834 Views
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

Labels (2)
Tags (2)
0 Kudos
Reply
3 Replies

805 Views
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 Kudos
Reply

789 Views
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 Kudos
Reply

770 Views
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 Kudos
Reply