Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Fail to access SDRAM above 1MB

I am using Altera's example Altera-SoCFPGA-HardwareLib-FPGA-CV-GNU

Trying to write 1B from address 0x00100000 till 0x00200000 like:

alt_write_byte(mbs+i, (uint8_t)buf_8b[0]);

The application hangs at this point on 26th byte

Any ideas are welcome

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Probably because there is something important at that memory location. The linker script links the program to use memory starting at 0x00100000. If you look at hwlib.axf.objdump this will become very clear. Thus you're overwriting some program code. If you want to test out alt_write_byte(), why not declare a large array global array and write to that instead. That way you can write to a safe memory location without potentially interfering with anything else.

    fdh

    --- Quote Start ---

    I am using Altera's example Altera-SoCFPGA-HardwareLib-FPGA-CV-GNU

    Trying to write 1B from address 0x00100000 till 0x00200000 like:

    alt_write_byte(mbs+i, (uint8_t)buf_8b[0]);

    The application hangs at this point on 26th byte

    Any ideas are welcome

    --- Quote End ---