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.

AM3357 GPMC synchronous read is late

We are interfacing the GPCM, CS2 to a FPGA using a 16-bit bus, multiplexing address and data. Writes to the fpga registers work correctly, but reads do not. The high byte of the data read looks correct, but the low byte is not. We've disabled all other devices on the GPMC bus.

What's really interesting is that the ChipScope capture seems to indicate that the data value read back is present on the bus some time after the transaction has ended (CPMC_CLK has stopped, CSn, EOn deasserted). We can also see that the FPGA presents valid data in response to asserting OEn.

Here are the config register values:

[   63.149291] FpgaMem_get_cs2_info: GPMC_CS_CONFIG1_2=0x280c1211
[   63.155395] FpgaMem_get_cs2_info: GPMC_CS_CONFIG2_2=0x141407
[   63.161346] FpgaMem_get_cs2_info: GPMC_CS_CONFIG3_2=0xb0b06
[   63.167144] FpgaMem_get_cs2_info: GPMC_CS_CONFIG4_2=0x1208120c
[   63.173278] FpgaMem_get_cs2_info: GPMC_CS_CONFIG5_2=0x111616
[   63.179199] FpgaMem_get_cs2_info: GPMC_CS_CONFIG6_2=0x100b0ac3
[   63.185302] FpgaMem_get_cs2_info: GPMC_CS_CONFIG7_2=0x0f42

Note that we are running GPMC_CLK at GPMC_FCLK/2 - all signals are "half-speed".

Here is the ChipScope plot. We should be reading 0xFFFF, but we read 0xFF7e instead.

Can you see any reason why we are reading the wrong value?

  • Hi Curtis,

    Please check whether you have RX enabled in your GPMC_CLK pinmux. This is necessary for read operations.

  • Hi Biser,

    I believe RX is enabled for GPMC_CLK, since we get non-zero values when we read. Here is our GPMC pin_mux:

    static struct pinmux_config gpmc_pin_mux[] = {
    {"gpmc_ad0.gpmc_ad0", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad1.gpmc_ad1", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad2.gpmc_ad2", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad3.gpmc_ad3", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad4.gpmc_ad4", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad5.gpmc_ad5", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad6.gpmc_ad6", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad7.gpmc_ad7", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad8.gpmc_ad8", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad9.gpmc_ad9", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad10.gpmc_ad10", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad11.gpmc_ad11", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad12.gpmc_ad12", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad13.gpmc_ad13", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad14.gpmc_ad14", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_ad15.gpmc_ad15", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_a0.gpmc_a0", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_a1.gpmc_a1", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_a2.gpmc_a2", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_a3.gpmc_a3", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_a4.gpmc_a4", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_a5.gpmc_a5", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_a6.gpmc_a6", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_a7.gpmc_a7", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_csn1.gpmc_csn1", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLUP },
    {"gpmc_csn2.gpmc_csn2", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLUP },
    {"gpmc_oen_ren.gpmc_oen_ren", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_wen.gpmc_wen", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_clk.gpmc_clk", OMAP_MUX_MODE0 | AM33XX_INPUT_EN /*| AM33XX_PIN_INPUT_PULLUP*/},
    {"gpmc_wait0.gpmc_wait0", OMAP_MUX_MODE0 | AM33XX_INPUT_EN | AM33XX_PIN_INPUT_PULLDOWN },
    {"gpmc_advn_ale.gpmc_advn_ale", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_ben0_cle.gpmc_ben0_cle", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_ben1.gpmc_ben1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_wpn.gpmc_wpn", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
    {NULL, 0},
    };

    Since I last posted, we now suspect a hardware issue on the shared A/D bus. I'll update this thread when I know more.

    Thanks,
    Curtis
  • Hi Biser,
    We resolved the hardware issue, and the FPGA interface is now working. Thanks for your support!
    Curtis