Other Parts Discussed in Thread: HALCOGEN
Hi,
We are trying to use the MibSPI interface (specifically SPI #1) to communicate with an ADC device. The functionality is simple, we want to send and receive 27 packets of data, when the last packet is received a DMA channel is triggered to copy data from RXRAM to a local buffer.
Current configuration:
- Multibuffer mode.
- IO DMA.
- SCS1, SPICLK, SIMO0 and SOMI0 set as functional (rest of pins default setting as non-functional).
- Data format 0:
No gap delay, Polarity even, Parity check disable, shift dir MSB, Full duplex enable, CS delays disabled, CLK polarity high, phase delay enable, prescale = 4, data length = 16, 1 line mode.
- Transfer Groups:
TG0, TG disable (it will be triggered when required), one shot enable, PRST ignore, trigger always, Trigger source disable, start index = 0.
TG1 (dummy, only to limit size of TG0), TG disable (always), start index = 27.
- SPI DMA:
one shot disable, Trigger buffer 26, rx dma line 2, rx dma enable, tx dma disable, no brk interleaved.
The configuration for the TXRAM packets is:
Suspend overwrite protect, CS hold for two packets and release for third one (repeating this pattern along the 27 packets), TG lock (only the 27th packet is unlock), using data format 0.
We have used other of the available buses and had no problem sending the data packets, but when using SPI #1 the following happens:
- When TG0 is enabled, the transmission starts and only 5 packets are sent one after the other with no problems, then each packet is sent with a gap of ~14ms between them, so transmitting the 27 packets is taking a lot.
- Another test was to create 8 TGs (0 to 7) and allocate 3 packets per TG (24 packets total), we try to enable all TG, 1 by 1, and TGs 1 to 7 send the 3 packets as expected but TG0 sends only 2 packets and then waits few ms before sending the last one, a transmission that could take ~500us ends up taking several ms.
Do you know if there is any difference we should consider when using SPI #1?
If you need any other information to better describe what could be happening, let me know.
Regards,