Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RA8M1 / RA8D1 : J-Link OSPI Flash Loader fails if flash in OSPI mode #330

Open
renesas-andyb opened this issue Nov 6, 2023 · 0 comments

Comments

@renesas-andyb
Copy link

renesas-andyb commented Nov 6, 2023

J-Link provides a flash loader for the RA8x1 MCUs suitable for programming code & data into external flash at 0x8000_0000 or 0x9000_0000.

However currently this flash loader will fail to program the external flash if the flash has already been configured into OSPI mode (for example by application code that has previously been programmed into the internal flash).

This can lead to errors being displayed such as:

e2 studio :
image

J-Link log file :
image

J-Link commander :
image

This problem can be avoided by resetting the OSPI flash device into single bit mode before programming. This can be done using the JLinkScript file contained in the attached ZIP file : RA8x1_Reset_OSPI.zip. This uses the OM_Reset (P106) pin - which is expected to be connected from the RA8x1 MCU to the flash device - to trigger a reset of the flash.

If using e2 studio, this JLinkScript can be added to the launch configuration:
image

If using other tools, see the information on SEGGER's wiki site : https://wiki.segger.com/J-Link_script_files#Using_J-Link_script_files

Alternatively, you can carry out an initialise operation in the RFP (Renesas Flash Programmer) tool to mass erase the MCU, and then do a full power on reset before attempting to program the OSPI flash device.

@renesas-austin-hansen renesas-austin-hansen changed the title RA8x1 : J-Link OSPI Flash Loader fails if flash in OSPI mode RA8M1 : J-Link OSPI Flash Loader fails if flash in OSPI mode Nov 6, 2023
@renesas-andyb renesas-andyb changed the title RA8M1 : J-Link OSPI Flash Loader fails if flash in OSPI mode RA8M1 / RA8D1 : J-Link OSPI Flash Loader fails if flash in OSPI mode Jan 8, 2024
jeremy-baker added a commit to lvgl/lv_port_renesas_ek-ra8d1_gcc that referenced this issue Mar 29, 2024
Enable the OSPI Flash on the EK-RA8D1 board and move the
const data for img_ebike_bg_large.c to the OSPI flash
using the linker script

need to add the RA8x1_Reset_OSPI.JLinkScript to the
debug configuration->Connection Settings->Script File :-
${workspace_loc:/${ProjName}}/RA8x1_Reset_OSPI.JLinkScript

renesas/fsp#330
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants