Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: Using SPI, DMA and DMAE0 on MSP432

$
0
0
Jasaleia, I think you have addressed this accurately. You will need to interrupt the CPU from a GPIO event and start the DMA transfer. The example I provided was an attempt to show how to interleave GPIO activity but in hind-site really is not applicable to your application. The example is intended for transmission (chip select) and does not apply to receiving/triggering the DMA. Regarding your other questions… (1) In the scatter-gather mode the DMA primary is used to load the task into the DMA alternate and then the alternate DMA is executed. The tasks will always reside in the alternate and the primary is just used to move the task from memory into the alternate’s memory location. (2) If you look at the figures 9-6 ( www.ti.com/.../slau356d.pdf and 9-7 ( www.ti.com/.../slau356d.pdf , in the users guide and the uDMA TRM from ARM, you will find that the LSB is set in the cycle_ctr portion of the channel_cfg. The definition of UDMA_MODE_ALT_SELECT addresses this. You can also see this in Table 9-13 where it distinguishes between the alternate and primary structures. (3) MEM mode is intended to be an ‘automatic’ trigger. In other words, there is an initial trigger defined by the channel and all subsequent transfers take place as soon as the previous is finished. In the PERipheral mode, each DMA does not take place without a trigger. This is also shown in figures 9-6 and 9-7 and the difference is ‘auto-request’ verse just a request. (4) Generating code examples will take some time and I cannot commit to a specific time frame. The example that I provided is a good place to start. There is also another thread where two separate DMA channels are used for Rx and Tx which might be helpful. e2e.ti.com/.../2027097 Regards, Chris

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>