Hi,
One issue about MibSPI.
CPU : TMS570LC4357
Peripheral Module : MibSPI3
Used Mode : Multi-Buffer
Design Node : SPI Master
Many questions as bellow:
1.1 When MOSI transmit 4 word command, is there data received from MISO line and shift into the Rx RAM buffer?
If so, that means there will be offset (4) to get the real data (10 words) by function mibspiGetData?
1.2 For receiving the data from MISO, MOSI need to continue sending out data to keep the clock,
Is it right?
1.3 If all above are right, for this transaction, actual length of send data will be 14 word,
and actual length of receive data will be also 14 word. But offset position where real received data is 4.
Is it right?
1.4 If all above are right, the DMA will be consider to be used, if the total of Tx length and Rx length more than 128 Words, yes?
Using DMA for the transaction of above example, if Command length is 30 words and Receive data 100 words.
The questions bellow are base the presume theory above.
Total length is 130 words, for maximize throughput designed the buffer size 65 words, says element size. And frame number is 2.
The software process is below:
(1) Compute element size and frame number base on total data length, in this example, e_count = 65, f_count = 2.
(2) Initial TRANSFER GROUPS.
(3) Initial Control words in Tx RAM.
(4) Configuaration DMA
(5) Configuration DMA in MibSPI
(6) Start Transaction
(7) When the total data length change, application will redo the configuration process.
Additional Information:
My QUESTIONS as below:
2.1 Please help me to check is there some wrong setting in configuration.
2.2 How to evaluate when the transition finish?
The PEND DMA register is used in the logic, the bit of PEND register is corresponding to “nDMA_CHN_**” or “nDMA_REQ_**”? It is confused to me.
2.3 Found an issue, when total data length changed, and re-configuration finished, the transaction cannot trigger by mibspiTransfer function.
But I tried mibspiInit function, means totally reset initial, followed by the DMA configuration, then the transaction with new e_count and f_count works.
This experiment tell me that the process for DMA configuration to change e_count and f_count is not enough.
I think these is something missed? Could you help me to check?
2.4 Here dmaChannel_t - “nDMA_CHN_**” is the channel in DMACOUNT[channel] or in DMACTRL[channel] ??
Or is there some relation? Could you explain more to me?
2.5 In my understand, there is no need to use DMACTRL [1]、DMACTRL [2]、DMACTRL [3] ……
Could you take an example to explain how to use?
2.6 If the data length in MISO and the data length in MOSI are different, How to configuration DMA?
Thanks a lot.
Br, Jordan