This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1292 interfacing with AM335x

Other Parts Discussed in Thread: ADS1292

Hi


I'm using AM335x processor to interface ADS1292 via SPI. is there readily available driver for this interface?


I'm using customising ti-sdk-am335x-evm-07.00.00.00 sdk to my needs, but finding difficulties in interfacing ADS1292. Can any one help in this regard?

thanks


Sudhee

  • Hey Sudhee,

    Unfortunately there is no available driver for that processor. What are you having trouble with? Perhaps I can help.

    Regards,
    Brian Pisani
  • Hi Brian,

    Thanks for your reply.

    We are trying to read registers of ADS1292 by referring code from the below link.
    https://github.com/jdesbonnet/ADS1x9xECG/blob/master/raspi/ads1292.c

    But unable to read registers. Read buff shows "FF". SPI driver configuration is done as follows

    • /ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01/arch/arm/boot/dts/am335x-evmsk.dts

      spi0_pins: pinmux_spi0_pins {
                  pinctrl-single,pins = <
                      0x150 (PIN_INPUT_PULLUP| MUX_MODE0)    /* spi0_clk.spi0_clk */
                      0x154 (PIN_INPUT_PULLUP | MUX_MODE0)    /* spi0_d0.spi0_d0 */
                      0x158 (PIN_INPUT_PULLUP| MUX_MODE0)    /* spi0_d1.spi0_d1 */
                      0x15c (PIN_INPUT_PULLUP| MUX_MODE0)    /* spi0_cs0.spi0_cs0 */
                  >;
              };

              spi0: spi@48030000 {
                  pinctrl-names = "default";
                  pinctrl-0 = <&spi0_pins>;
                  reg = <0x48030000 0x400>;
                  #address-cells = <1>;
                  #size-cells = <0>;
                  interrupts = <65>;
                  clocks = <&dpll_per_m2_div4_ck>;
                  clock-names = "fck";
                  ti,spi-num-cs = <2>;
                  ti,hwmods = "spi0";
                  dmas = <&edma 16
                      &edma 17
                      &edma 18
                      &edma 19>;
                  dma-names = "tx0", "rx0", "tx1", "rx1";
                  status = "okay";
                  spidev: spidev@0 {
                      compatible = "linux,spidev";
                      spi-max-frequency = <24000000>;
                      reg = <0x0>;
                      spi-cpha;
                  };
              };

    • /ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01/arch/arm/mach-omap2/board-generic.c

      static struct spi_board_info am335x_spi0_slave_info __initdata = {
          .modalias        = "spidev",
          .bus_num        = 1,
          .chip_select        = 0,
          .max_speed_hz        = 48000000,
          .mode            = SPI_MODE_1,
      };

    Note:

    Using these setting and shorting DIN and DOUT pins of ADS1292 we are able to run spidev_test

    root@am335x-evm:~# spidev_test -D /dev/spidev1.0 -H
    spi mode: 1
    bits per word: 8
    max speed: 500000 Hz (500 KHz)
     
    FF FF FF FF FF FF  
    40 00 00 00 00 95  
    FF FF FF FF FF FF  
    FF FF FF FF FF FF  
    FF FF FF FF FF FF  
    DE AD BE EF BA AD  
    F0 0D  

    Kindly help us in going ahead and read register value of ADS1292.

    Thanks and Regards,

    Lahari P.

  • Hey Lahari,

    The best way to start debugging an interface issue is to get the oscilloscope or logic analyzer and see what is happening with the individual bits during a given transaction. Can you look to make sure the device is receiving the correct command that way?

    Regards,
    Brian Pisani
  • Thanks Brian, I will check signal and try to debug using oscilloscope.

    Can you just let me know if my configuration settings are proper in am335x-evmsk.dts and board-generic.c file? Am I missing something in initializing? Kindly guide me.

    Regards,

    Lahari P.

  • Hey Lahari,

    Unfortunately I am unfamiliar with that processor and would not be able to add anything helpful if I were to review the code. My expertise will come in seeing the SPI protocol on the scope and identifying the problem that way.

    Regards,
    Brian Pisani