AnsweredAssumed Answered

84789 DMA configuration - automatic SPI read

Question asked by TurboMan on Feb 29, 2016
Latest reply on Mar 1, 2016 by TurboMan

Firstly, I cannot find where to open a new service request for DSCs. More information would help here, thank you.


I have a DMA configuration issue with the MC84789VLL.


Here is what I wish to do with DMA:

1. Set up SPI transmit to automatically transmit 7 bytes (1st = address, 2-7 = 0xFF)

2. Configure receive DMA to transfer 7 bytes to a buffer in memory.

3. Trigger the transfer and deal with the data in memory when it has arrived.

4. I have partially managed this with a cycle-steal transfer triggering a 2nd DMA channel (with channel linking) to read back a byte each time.


My problems:

1. The DMADONE ISR handler is entered too early. I have to transfer 9 bytes so that chip select (managed manually) is triggered in the right place.

2. The returned data in the buffer is rubbish data. The oscilloscope says 0x00, 0x10, 0x00, 0x50... but the data buffer in memory will display 0xFF, 0xFF, 0x00, 0x00, 0x10, 0x10 and the rest at 0. It looks like a byte/word size issue but source, destination and SPI transfer size are all at byte settings. This happens on the first transfer, then all subsequent transfers just fill the buffer with 0x3Fs.


From paper specifications, I've said it's possible to do what I want above. Does anyone (NXP support?) have an example of the above? The awkward part is the first byte being different from the rest.


Help very much appreciated,