OSPI flashing with EK-RA8D1 debug session

Hi,

is it possible to flash the OSPI with the embedded JLink when launching a debug session on the EK-RA8D1 kit ?

I have declared some constant array like this:

const __attribute__((aligned(8))) __attribute__((section(".OSPI_DEVICE_0"))) __attribute__((__used__))int32_t test_vector[4] = { 0, 1, 2, 3, };

I can see the .hex correctly including them, but when I open the memory browser at 0x800_0000 it's all 0xFF.

What I am missing?

I do initialize the OSPI as is done in the ospi_b_ek_ra8d1_ep example, and I can then  sucesfully operate with the OSPI flash.

thank you

  • Hi Francovaro,

    Thanks for reaching out Renesas Community.

    I don't have an EK-RA8D1 but I have the EK-RA6M3, and I try the same sample project on it. Find it works well, I can write to the OSPI and see the memory changed after I write or erase it.

    When I enter 1 in RTT viewer:

    The memory block changes:

    "

    I can see the .hex correctly including them, but when I open the memory browser at 0x800_0000 it's all 0xFF.

    What I am missing?

    "

    About the question you raised, could you kindly tried to use the RTT viewer to enter some commands to write data in OSPI? You may see some difference.

    BR,

    NP_Renesas

  • Hi,

    as said, I can write and read from OSPI when the application is running.

    What I'm trying to do is to put some const arrays in the OSPI region, I checked the .hex file and they are correctly allocated.

    Code:

    const __attribute__((aligned(8))) __attribute__((section(".OSPI_DEVICE_0"))) __attribute__((__used__))int32_t test_vector[4] = { 0, 1, 2, 3, };

    And the hex:

    :0200000480007A

    :1000000000000000010000000200000003000000EA

    But If i try to access them (after the OSPI has been initialzied)

    for (int i = 0; i < 4; i ++) {

    APP_PRINT("\r\narray %d: %d", i , test_vector[i]);

    }

    It shows:

    00> Device ID read successfully
    00> Manufacturer ID = 0x34, Memory Interface Type = 0x5B, Density = 0x1A
    00>
    00> Check array
    00> array 0: -1
    00> array 1: -1
    00> array 2: -1
    00> array 3: -1

    And the Memory Browser shows all 0xFF.

    I to instruct the JLink to flash these region too ? Is it possible?

    BR,

    fv

  • On EK-RA8d1, the ospi flash is located at 0x90000000, ".OSPI_DEVICE_1" . You manage to read the Manufacturer ID. Was yours placed in 0x80000000?

  • Hi

    I think the manufacturer is read from the flash, not from memory, so yes I was able to read it.

    Now I moved the test vector to .OSPI_DEVICE_1 and I can read the values!

    Where did you read that is mapped to 0x900_0000 ? Just from the example ?

    thank you.