Hi,
I have been developing driver for ADS8568 with SPI interface. The DSP is C6748 and OS is DSPBIOS.
The ADC is 16-bit, 8-channel simultaneous. It requires CONVST signal to start conversion and it sends EOC signal to indicate conversion is done. Then 128-bit data (conversion results for 8 channels) is ready to read by host. Host needs to send 128 serial clock to read the result over SPI bus.
All the operations of driver are performed by peripherals without utilizing DSP core. The operation sequence of my driver is;
1 - Set timer output to provide CONVST signal.
2 - Capture EOC signal-comes from ADC when it done conversion-by GPIO interrupt.
3 - EOC signal-GPIO interrupt-triggers an EDMA channel to send dummy bytes. (At this step I need to write 128 serial clock to be able to read 128 data bits from the ADC)
4 - SPI RX interrupt triggers an EDMA channel to get the conversion result from SPI RX buffer to RAM.
5 - Go to interrupt handler after acquiring n data from SPI RX buffer to RAM and post semaphore.
At the step 3, I need 128 serial clocks. To write more dummy bytes to SPI TX register, DSP has to wait until SPI transmit is completed. I used SPI TX EDMA channel to solve that. SPI transmit interrupt triggers the EDMA channel and I have 128 serial clocks.
The problem is I couldn't reload SPI TX EDMA parameters automatically. If I link and reload parameters, I create a deadlock. The EDMA triggered by SPI transmit interrupt and then transmits one more. I don't want to use interrupt service routine to reload the EDMA parameters. I couldn't figure out how to reload.
I hope I could explain my problem. I need your support. Please ask me If you find the explanation is unclear.
Thanks in advance
Serdar