MCU-PLUS-SDK-AM243X: AM243x_lp with MX25L25645G custom flash

Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi team,

We are currently using a custom flash with the AM243x Launchpad. During debugging, I'm encountering the following error:

MAIN_Cortex_R5_0_0: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x40: (Error -1065 @ 0x40) Unable to access device memory.
MAIN_Cortex_R5_0_0: File Loader: Verification failed: Target failed to write 0x00000000.


I suspect that the issue might be related to the linker command file configuration. Specifically, if we are using a custom flash, we need to change the address of the memory region in SysConfig.

Could anyone provide guidance on how to correctly configure the memory regions in SysConfig for our custom flash?

Regards,
Abinaya

  • Hello Abinaya,

    Thanks for your query.

    Can you please confirm, Are you able to flash the SBL binaries successfully?

    Are you able to see the SBL logs when booting from OSPI boot mdoe?

    Please refer EVM_FLASH_SOC_INIT 

    Regards,

    Tushar

  • Hi Tushar,

    Thankyou for your response.

    The second command is halted when I'm executing the SOC initialization.

    For adding custom flash, I am following this guide: Custom_flash

    Could you kindly advise on any possible solutions or further procedures I should take to solve this issue?

    Regards,

    Abinaya

  • Hi Abinaya,

    The second command is halted when I'm executing the SOC initialization.

    Is this command failing every time or it happens randomly?

    Can you please check which device type are you using? Is it a GP device or HSFS?

    Please refer faq-am6xx-how-to-check-if-device-type-is-hs-se-hs-fs-or-gp 

    Regards,

    Tushar

  • Hi Tushar,

    The command is running fine with the default flash, but it's failing with the custom flash only.

    The am243x_lp device type is HSFS.



    Thankyou for your assistance.

    Regards,

    Abinaya

  • Hello Abinaya,

    Can you please send us the SysConfig file for the SBL Null project?

    Also my assumption is that:

    1. You already have the SFDP values by running the SFDP OSPI Flash Diagnostics example.

    2. You have updated the values(by taking it from flash diagnostics example) in sbl_null project.

    Looking forward to your response.

    Regards,

    Vaibhav

  • Hi Vaibhav,

    Herewith, I have attached the SysConfig zip file.

    6320.example.zip

    1.I have the SFDP values from the OSPI Flash Diagnostics example.

    2.I have not updated the SFDP value in the SBL Null project. I am only assigning it in the Flash Diagnostics example.


    Thankyou for your assistance.

    Regards,

    Abinaya

  • Hello Abinaya,

    Thanks for providing the requested file.

    I do not see OSPI/Flash module added in the example.syscfg file you have attached.

    See this is how our flow should be.

    I would need you to share with me the flash part's datasheet here or a link to it. This would be used for later references.

    Apart from that you would need to run the OSPI Flash diagnostics example which I think you have already run.

    Can you share me the logs from the Diagnostics example?

    Looking forward to your response.

    Regards,

    Vaibhav

  • Hi Vaibhav,

    Here I attached the flash datasheet for MX25L25645 - MX25L25645 - Macronix.

    Additionally, I've attached the zip file for the OSPI flash diagnostic example with the custom flash configuration added in SysConfig.

    5165.example.zip

    The Macronix flash JSON file has been added to SysConfig as well.
    MX25L25645G_0710.zip

    We followed the guide for adding a custom flash: CUSTOM_FLASH_SUPPORT_GUIDE

    I ran the OSPI flash example, but it's not debugging in QSPI boot mode; it only works in DEV boot mode, although no output is received.

    I have a doubt about whether the OSPI Flash diagnostics example with custom flash can be debugged in QSPI boot mode or not.

    Which boot mode should we use for debugging with custom flash?

    Could you kindly advise on any possible solutions or further procedures I should take to solve this issue?

    Thank you for your assistance.

    Regards,

    Abinaya


  • Hello Abinaya,

    For QSPI as well the flash diagnostics will work.

    Do not worry, I have a short E2E for you to go through. E2E: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1391564/sk-am64b-ospi-flash-diag-example-failing

    Please go through the same and you should be able to see the proper values of the OSPI flash diagnostics with QSPI flash part.

    Let me know if things gets fixed at your end.

    Looking forward to your response.

    Regards,

    Vaibhav

  • Hi Vaibhav,

    Thank you for the reference. The QSPI flash example is working fine on my end.

    However, I am still facing an issue where the QSPI example with a Custom flash in OSPI boot mode is not functioning as expected. Could you provide further guidance on this?



    1. I have a doubt about whether the OSPI Flash diagnostics example with custom flash can be debugged in QSPI boot mode or not.

    2. Which boot mode should we use for debugging with custom flash?


    Looking forward to your advice.

    Regards,

    Abinaya

  • Hello Abinaya,

    1. I have a doubt about whether the OSPI Flash diagnostics example with custom flash can be debugged in QSPI boot mode or not.

    I would put a no to this question of yours.

    Look use something like a UART bootmode and then have the values fetched from the OSPI flash diagnostics example.

    Now since you have the values you can go ahead and set them under the flash tab in SysConfig.

    Once done, now you can go ahead and use the other bootmodes for your flashing and reading operations.

    Regards,

    Vaibhav

  • Hi Vaibhav,

    Thankyou for your assistance.

    If I use a custom flash JSON file in SysConfig, the example doesn't work as expected.

    For instance, I modified the flash settings in the "Hello World" program by loading a custom JSON file into SysConfig.

    The build process completes successfully, but the debugging does not work.

    looking forward to your response.

    Regards,

    Abinaya

  • Hello Abinaya,

    but the debugging does not work.

    When you say debugging does not work, does it means that the application is not running?

    Regards,

    Vaibhav

  • Hi Vaibhav,

    Thankyou for your response.

    Yes, the application is not running in QSPI boot mode, but it runs correctly in DEV boot mode.

    looking forward to your response.

    Regards,

    Abinaya

  • Hi Abinaya,

    Currently, The subject matter expert is out of office. Please expect responses in several business days.

    Regards,

    Tushar

  • Hi Tushar,

    Thankyou for your response.

    Waiting for your reply.

    Regards,

    Abinaya

  • Hello,

    Thank you very much for your patience.

    Yes, the application is not running in QSPI boot mode, but it runs correctly in DEV boot mode.

    So, the OSPI Flash Diagnostics example is expected to work mostly with all boot modes except for QSPI bootmode as we want to make sure that the ROM setting applied to the flash are not carried forward when you go ahead and run an application like sbl null or ospi flash diagnostics and so on.

    So I would suggest you to go ahead with dev boot mode just for the OSPI Flash diagnostics applications.

    Also you could use API:  flashFixUpQspiBoot() which performs a reset on the flash part and call this API before your application to make sure the flash is reset.

    Regards,

    Vaibhav