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.

RM57L843: Mib-SPI with DMA support

Part Number: RM57L843
Other Parts Discussed in Thread: TCAN4550, HALCOGEN

Hi,

a customer is using a TCAN4550 with the RM57L843 over Mib-SPI. As part of that interface multiple Transfer Groups TGs with buffers get initialized and enabled. When the Mib-SPI is complete, currently the CPU is used to read out the data. But we would like to use the DMA instead.

Are there good examples for usage of Mib-SPI with DMA?

Specific questions about the DMA:

  • Can the DMA read 4 16-bit Mib-SPI buffers, extract only 8-bits of data from each, and then write the data as big endian into a byte array?
  • Can the DMA repeat the above operation over multiple buffers, effectively reading all of the buffers within a transfer group?
  • Does the Mib-SPI have any built-in hooks with the DMA to read/write data to/from the Mib-SPI buffers?

Thanks!

--Gunter

  • Hi Gunter,

    HALCoGen includes an example for using DMA with MibSPI. It is a basic example for TX DMA using internal loop-back mode, but it serves to demonstrate triggering the DMA using a TX event.

    As for the specific DMA questions:

    • Can the DMA read 4 16-bit Mib-SPI buffers, extract only 8-bits of data from each, and then write the data as big endian into a byte array?
      • Yes, this is certainly possible. The DMA controller supports flexible byte offsets on the source/destination indexes, which can be used to "manage" the read and write operations.
    • Can the DMA repeat the above operation over multiple buffers, effectively reading all of the buffers within a transfer group?
      • The application can define the required trigger event and configure it to transfer a block or frame per each trigger. The number of elements per frame and number of frames per block are configurable as well.
    • Does the Mib-SPI have any built-in hooks with the DMA to read/write data to/from the Mib-SPI buffers?
      • Yes, the connection between DMA request number and the specific MibSPI instance is defined in the datasheet.

    Regards,

    Sunil

  • Gunter,

    Are there any questions about my comments in the previous post? Was the customer able to configure the MibSPI and DMA to do what was required?

    Regards, Sunil