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.

TMDSIDK437X: Problem with initialization of GPMC

Part Number: TMDSIDK437X
Other Parts Discussed in Thread: AM4377

Hi, 

I use a custom board with am4377 with ccs 6.1.2 and sdk 2.1.1.2

I tried to write a simple initialization code for gpmc module to communicate with FPGA block however I faced a problem when trying to use any of the functions from GPMC API from gpmc.h.

I set a pinmux configuration for gpmc, enabled the module by PRCM API and aquired the base address of it - should it be equal to 0x5000000?

Now, I would like to reset the module, set its mode and do the timing configuration but every time I use any GPMC API function (even the simplest requiring base address only) exit() function is launched by assert_param(). My assumption is that the base address of the module is wrong. Or maybe I forgot about any step - however none of the solutions posted on E2E works for my case.

Could you please advise me how to check if GPMC module is enabled and how to start its configuration?

Thanks,

JJ

  • Hi Jacek,

    are you missing a zero?
    From TRM memory map table:

    GPMC 0x5000_0000 0x50FF_FFFF 16MB GPMC Configuration registers

    Regards,
  • Hi Frank,
    You are right, I made an error in the question. I should have written: "should it be equal to 0x5000_0000?"
    The rest of the thread looks OK - i.e. my question is valid.
    Thanks,
    JJ
  • Ok, so did you also configure MMU for this space?
  • Yes, I added the line {(void *)0x50000000, SYS_MMU_BUFFERABLE},\ to a MMU struct.
  • That means I am out of ideas for now. Can you check the relevant PRCM regs if the clocks for GPMC are really active?
    Otherwise I have to defer that to other experts... I have not tried any examples on AM437x using GPMC.
  • Hi Frank,
    Somehow the module works when I changed the option SYS_MMU_BUFFERABLE to SYS_MMU_CACHEABLE. Does it mean the cache is the right place to carry the parameters?
    I have configured the module parameters to cooperate with a FPGA and encountered another problem. When I choose the NAND type device and send the data via GPMC_NAND_DATA register, the appropriate data is present at the bus. However, when I choose NOR type device (which is suitable for my SRAM device) and try to write data to the location within the GPMC external memory (from 0x0000_0000 to 0x1FFF_FFFF in am437x) in the following manner:

    volatile uint8_t *p32 = (uint8_t *) (0x100000); /*address above the unaccesible 1MB*/
    *p32 = 0xAAAA; /*Write AAAA data*/

    I get hard error with exit() function. Is this the right way to write the data? I have configured a MMU for this location :

    {(void *)0x00000000, SYS_MMU_BUFFERABLE},\

    and tried with different GPMC settings - is there any important thing to be done?

    Thank you,
    JJ