Part Number: TMS320F28379D
Hello!
I find myself in a bit of a conundrum developing an interface to several LTC2344 quad 18bit ADC with SPI interface.
1. My first thought was that the ideal way to do so would be to use the DMA channels to handle to communication while I can do other things in the main CPU1. I saw a post by Juan Gamba, where he exemplifies how it could be achieved , but from what I am seeing these waiting loops are still happening withing the main loop, not really giving much sense to using the DMA, am I right?
2. Secondly, I also realized that the DMA limits the transmission data size to 16bits for SPI. Given that the ADC can transmit a continous stream of data of all the four channels in a 18bit+6bit(of configuration) per channel that would mean thatin total we receive 96 bits, which I understand could be handled by a burst of 6 16 bits in the receiveing channel of the, but it is quite a hassle for post-processing. Additionally, I would still be unsure how to deal with diferent slaves efficiently within the DMA. Any ideas?
On another note, I also consider just using the actual SPI modules and interrupts which can be configured for the right ammount of bits (2x12 bit transmission for each channel). Nevertheless, I am quite clueless as to how the actual interrupt process happens here. I have read through the Technical Reference Manual SPRUHM8I but it's not clear what generates the interrupts in SPI in FIFO mode. (E.g. In FIFO mode, the SPI can interrupt the CPU upon a match condition between the current receive FIFO status (RXFFST) and the receive FIFO interrupt level (RXFFIL). If RXFFST is greater than or equal to RXFFIL, the receive FIFO interrupt flag (RXFFINT) will be set. SPIRXINT will be triggered in the PIE block if RXFFINT is set and the receive FIFO interrupt is enabled (RXFFIENA = 1).).
3.For RX, is the SPI module constantly receiving until it fills up the pile and then this generates an interrupt to check??
4.A similar description is provided for TX, but in an example code "Example_2837xDSpi_FFDLB_int.c" I see that the data is loaded SPITXBUF already in the ISR. What generates the interrupt in the first place?
5.Finally, what could be an efficient procedure here to handle the several bursts of info coming from each SPI slave ADC + the several slaves?
Best regards,
Miguel