We have a problem with our uPP implementation that occurs in rare cases (probablity 0.5%).
The uPP interface is operated in duplex mode 0 (RX: channel A; TX: channel B),
16 bit wide data at 75 MHz.
UPPCR = 0x8E
UPDLB = 0x0
UPCTL = 0x02020006
UPICR = 0x00380038
UPIVR = 0x0
UPTCR = 0x0 (64 byte thresholds)
In TX direction, data is sent out on a periodical basis, triggered by a timer.
In this direction, the problem is observed in a special scenario, where data
is transferred from external SDRAM, intermixed with data from internal RAM.
It looks as if the data from the external SDRAM is sometimes sent twice
instead of once, although the channel descriptors appear to be correctly set.
In the error scenario, we have read the channel's status registers just before
and after triggering the DMA transfer. In the following I try to describe what
we have observed.
Transfer 1 (data from internal RAM (516 bytes)):
before triggering the transfer: UPQS0 = 0x11F00900, UPQS1 = 0x00020000, UPQS2 = 0x80
triggered by writing: UPQD0 = 0x11F006C0, UPQD1 = 0x00010204, UPQD2 = 0x0
just after the trigger: UPQS0 = 0x11F00780, UPQS1 = 0x000100E8, UPQS2 = 0x41
Transfer 2 (data from external SDRAM (68 bytes)):
before triggering the transfer: UPQS0 = 0x11F006C0, UPQS1 = 0x00020000, UPQS2 = 0x21
triggered by writing: UPQD0 = 0xC004C4C0, UPQD1 = 0x00010044, UPQD2 = 0x0
just after the trigger: UPQS0 = 0xC004C500, UPQS1 = 0x00010040, UPQS2 = 0x71
Transfer 3 (data from internal RAM (260 bytes)):
before triggering the transfer: UPQS0 = 0xC004C4C0, UPQS1 = 0x00020000, UPQS2 = 0x70
triggered by writing: UPQD0 = 0x11F00900, UPQD1 = 0x00010104, UPQD2 = 0x0
just after the trigger: UPQS0 = 0x11F009C0, UPQS1 = 0x000100C0, UPQS2 = 0x41
We have also read the contents of registers UPPCR and UPPISR.
UPPCR appears always to be 0x8E and UPISR = 0x1A10.
The data sent out in transfers 1 and 2 is perfect. The data sent out in transfer 3
and all the following transfer is corrupt. It looks as if the 68 bytes of the transfer 2
are sent out again at the beginning of transfer 3, followed by the first 192 bytes
of the 260 bytes requested in the 3rd transfer.
Question 1: Do you have an explanation for the observed malfunction?
Question 2: Is it maybe not allowed to mix DMA transfers from different sources -
internal RAM and SDRAM?
Question 3: Is it possible to derive any information from this watermark indication in reg. UPQS2?
In the documentation, it is said that this field records the FIFO block emptiness
when the channel is operated in transmit mode. Reading this field often shows values of 0x2, 0x4
or 0x8 when the uPP interface is in a good condition. When the transmission has failed, a
value of 0x7 can be read.
Best regards
Jörg