This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2432: DMA transfers other than 32 bytes (xout)

Part Number: AM2432

[日本語]

 L85のxoutの引数として、R2~R9の32バイト分データとR10~R11に書き込み先アドレスを設定し、その合計が38であることは、
 理解しています。
 ただし、32バイト未満のデータをDMA転送(xout)する場合は、ユーザーズガイドの
 「6.4.6.3.1.6 XFR2VBUS Programming Model」にある
 "XOUT (6 Byte address or 4 Byte address) then XOUT 32 Byte/ 8 Byte/ 4 Byte/ 1 Byte data"を使用する方法
 だと認識する。
 以下のコードで合っているでしょうか?
 xin RXL2_SIDEA, &r2, 8
 zreo r10, 8
 ldi32 r10, (WR_ADDR)
 xout xfr2vbus_wr0 &r10 6
 xout xfr2vbus_wr0 &r2 8

[English]
 
 I understand that as an argument for L85's xout, 32 bytes of data from R2 to R9 and the write destination
 address are set to R10 to R11, making the total 38.
 However, when performing DMA transfer (xout) of data less than 32 bytes, I recognize that the method is to
 use "XOUT (6 Byte address or 4 Byte address) then XOUT 32 Byte/ 8 Byte/ 4 Byte/ 1 Byte data" in
 "6.4.6.3.1.6 XFR2VBUS Programming Model" in the user's guide.
 Is the code below correct?
  xin RXL2_SIDEA, &r2, 8
  zreo r10, 8
  ldi32 r10, (WR_ADDR)
  xout xfr2vbus_wr0 &r10 6
  xout xfr2vbus_wr0 &r2 8

  • Hi Shimizu-san,

    Yes, I think your procedure is correct for sending out 8 bytes. You are following the two step approach as described in the TRM.

    • (1) XOUT (6 Byte address or 4 Byte address) then (2) XOUT 32 Byte/ 8 Byte/ 4 Byte/ 1 Byte data

    Regards,

     Thomas

  • [日本語]
    DMA転送(XOUT)後に「WR_BUSY」レジスタが"1h:Active"状態から"0h:Idle"状態に変化しない現象が発生しています。
    DMA転送のプログラムは以下の通りです。

    上記のプログラムの場合、8行目のXOUT後に「WR_BUSY」レジスタが"1h:Active"状態から"0h:Idle"状態に変化しません。
    「WR_BUSY」レジスタが変化しない原因は何でしょうか?

    注記1:
    データ転送先アドレス(R10)をR27に変更すると10行目のCOUT後に「WR_BUSY」レジスタが"1h:Active"状態から"0h:Idle"状態に変化しません。

    注記2:
    本現象は、下記プログラムの様に「WR_BUSY」レジスタを確認しています。

    [English]
    There is a phenomenon where the "WR_BUSY" register does not change from "1h:Active" state to "0h:Idle" state after DMA transfer (XOUT).
    The DMA transfer program is as follows.

    In the above program, the "WR_BUSY" register does not change from the "1h:Active" state to the "0h:Idle" state after XOUT on the 8th line.
    What could be the reason for the "WR_BUSY" register not changing?

    Note 1:
    If you change the data transfer destination address (R10) to R27, the "WR_BUSY" register will not change from the "1h:Active" state to the "0h:Idle" state after COUT on the 10th line.

    Note 2:
    This phenomenon is confirmed by checking the "WR_BUSY" register as shown in the program below.

  • Hi Shimizu-san,

    We have tested the xfer2vbus with the following code and it works. I.e. it copies 8 bytes of data to location 0x700E0000

    xfer2vbus_test:
      ldi R2, 0x1234
      ldi R3, 0x5678
      zero &r10, 8
      ldi32 r10, 0x700e0000
      xout 0x62, &r10, 6
      xout 0x62, &r2, 8

      qba xfer2vbus_test

    Can you compare your code example to ours from above, or just retest using our example?

    Thanks and regards,

     Thomas

  • As we have a second topic on DMA transfer, I will close this topic for now.