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.

RTOS/MSP430F5529: How to allocate dma(0-2) channels to usci peripheral

Part Number: MSP430F5529
Other Parts Discussed in Thread: MSP430F5259

Tool/software: TI-RTOS

Hi everyone

        I learned that MSP430F5529 has only three DMA(0-2) channels today.  but under TI-RTOS, the SPI module library default uses DMA.

        Now I had config two spis, one for the master and the other for the slave. when spiA1 and spiB1 both use DMA_CHANNEL_1(RX) and DMA_CHANNEL_1(TX). when I used the SPI_transfer() function to send and receive in the two TASK, I found that they were interfering with each other, resulting in data confusion.  this issue I've described before. It's the link()   

        now I configure two spi to use different dma channels, but I only have three dma channels, at least one DMA channel is shared by two SPI, which does not consider ADC and other peripherals to use DMA.  What can I do to avoid this problem? using semaphores? or spi not use DMA?   Who can give some advice or examples?  Because I'm going to use 4 spi and 10 ADCs on MSP430F5259 next.

best regards

xc.mo

1.consult



2.my spi config example


 

 

  • You should always lock shared resources.
    Semaphores are good to do it.


    I do not know your application.
    It is possible that MSP430F5529 is not reach enough in your case.


    SPI Master is good candidate for shared DMA channel because you have control when to send and wait for a data.
    If number of DMAs is too small, allocate DMAs to the "fastest" I/O to maximally offload MCU.

**Attention** This is a public forum