ADS127L18: Interfacing with AM263P4-Q1 MCU

Part Number: ADS127L18
Other Parts Discussed in Thread: AM263P4-Q1, TMS320F28377D, AM263P4

Tool/software:

Hello, 

I want to interface the ADS127L18 ADC with TI's AM263P4-Q1 MCU. I understand that the Frame Sync Data Port is made for other peripherals such as McBSP (as seen on the C2000 TMS320F28377D) while SPI is only used for register configuration. That being said, would there be a way to interface the ADS127 with the AM263 that doesn't involved bit-banging or other software-implemented methods?

Thank you, 

Dylan

  • Hello Dylan,

    I am not that familiar with the AM263P4, but it does have a PRU core, which should be capable of supporting the frame-sync interface.  Unfortunately, we do not have example code that shows how to do this specifically with the ADS127L18.  I did find this application note that describes how to implement different serial interfaces using the PRU core.

    https://www.ti.com/lit/an/sprade1/sprade1.pdf

    As an alternative to the PRU, the AM263P4 has multiple SPI ports.  You should be able to use one or more of the SPI ports in a 3-wire peripheral configuration to capture the frame-sync data as well.

    Regards,
    Keith Nicholas
    Precision ADC Applications

  • Hello Keith, 

    I have no experience with PRU, so could you check my thinking? As I understand, we would configure the PRU pin to be muxed as an eGPI pin with direct input mode. This would consume 3 GPI for DCLK, FSYNC, and DOUT0 (as we only want to use 1 data out pin). 

    As for using SPI, 3-wire peripheral would be using MOSI, SCK, and CS. In this configuration, we would need SCK to be mapped to DCLK, MOSI to DOUT0 and CS constantly pulled low. However, where would FSYNC go? And for a more general question of the frame-sync interface, is FSYNC necessary for the overall functionality (ie you can use software and some math to know when a frame is finished transmitting)?

    Lastly, what would the pros and cons be for using PRU vs SPI?

    Thank you for the timely help, 

    Dylan

  • Hello Dylan,

    Yes, this would be the correct pin configuration to use the PRU.  

    If you were to use SPI to connect to the data port, you are technically only using 2 wires in the SPI port; MISO connected to DOUT0 and SCK connected to DCLK (both outputs from the ADC and inputs to the MCU).  The FSYNC is not used in this case, and the START pin on the ADC is used to start and stop conversions.  In a full frame-sync interface, the FSYNC is a conversion rate clock and will automatically keep the MCU data collection synchronized to the ADC in case there is an interruption of communications due to noise or some other system level transient.

    This is the biggest con of using SPI.  Once communications is started over SPI, there is not direct hardware feedback to correct any communications errors.  This limitation may not be a concern in systems that only collect a block of data and then process, then another block of data, process, and so forth.  Since you are not continuously collecting data, you can resynchronize each time a new block of data is acquired by pulsing the START pin.  If you are continuously collecting data, at some point, there is likely to be a communications error, and you would need a mechanism to detect this at the system level, such as enabling CRC in the data stream and checking for correct CRC codes.

    In the case of the AM263P4, since it has a PRU that should be able to directly implement a frame-sync interface, this will be the more robust communications approach as any communications glitch causing loss of synchronization will be quickly recovered in a few samples.  I only mentioned using SPI since this may be quicker to get working between the processor and ADC.

    Regards,
    Keith

  • Perfect, thank you for the response!