I'm trying to use the Ethernet controller on a Keil LPC1857 eval
board.
After setting up descriptor arrays, buffers, configuring MAC and DMA,
I get a fatal bus error indicated in the DMA status register
immediately on setting the DMA_OP_MODE ST bit. I've verified that
DMA_TRANS_DES_ADDR is pointing to a descriptor, and after the error
occurs DMA_CURHOST_TRANS_DES looks valid. Here's waht I end up with
in DMA status
<code>
DMA_CURHOST_TRANS_DES = 0x0000e308
DMA_OP_MODE = 0x00002008
DMA_STAT = 0x03802002
TI 0
TPS 1
TU 0
TJT 0
OVF 0
UNF 0
RI 0
RU 0
RPS 0
RWT 0
ETI 0
FBI 1
ERI 0
AEI 0
NIS 0
RS 0
TS 0
EB1 1
EB2 1
EB3 1
</code>
I've got 16MB of SDRAM starting at address 0, and
the address for the current tx descriptor (0xe308) is correct.
What are possible causes of the fatal bus error when the DMA
controller is reading a tx descriptor?
The M3MEMMAP feature that is used to map SDRAM to address 0x00000000 doesn't affect the DMA controller, so the descripter and buffer pointers are invalid.
Translating them to unmapped addresses (in this case 0x2800xxxx) when setting up the descriptors and configuring the DMA controller fixes the FBI problem.