I managed to program my FPB-R9A02G021 board exactly once when I got it out of the box - so I know the J-Link OB is working and the J-Link tools are working, and the USB cable is working. However, now when I try to connect with JFlash, I get an error (see [Log 1 below]). I saw there was another thread reporting the same error message, but there was no solution.
If I move J8 to Closed and power up the board, then tap Reset, which in theory will stop any of my code executing, connecting with J-Flash produces [Log 2] below.
I tried soldering jumpers to J5 and J6 (which came as bare plated through holes) and selecting the 2-3 position, but that didn't affect J-Flash (I wondered if maybe having the UART pins floating made it stop working).
I installed the Renesas Flash Programmer hoping that maybe UART Boot mode was working and I could use that to program the chip (J5 and J6 on 2-3, J8 closed). Noting the line in the manual that says it will not enter the UART Boot mode on Power-On Reset and only on Reset, I pressed Reset and tried the Renesas Flash Programmer. It asked me for an Authentication Code, offering all-FFs as a default. Accepting the default, or selecting "Auto Authentication" produces [Log 3].
The only sign of life is if I:
However, even in this state, JFlash does not work.
Is my board really dead? What else can I try? Can I RMA it?
[Log 1]:
Application log started - J-Flash V8.12 (J-Flash compiled Dec 18 2024 15:28:23) - JLinkARM.dll V8.12 (DLL compiled Dec 18 2024 15:27:57)Reading flash device list [C:\Program Files\SEGGER\JLink_V812\ETC/JFlash/Flash.csv] ... - List of flash devices read successfully (451 Devices)Reading MCU device list ... - List of MCU devices read successfully (11667 Devices)Creating new project ... - New project created successfullyConnecting ... - Connecting via USB to probe/ programmer device 0 - Probe/ Programmer firmware: J-Link OB-RA4M2 compiled Oct 9 2024 11:01:47 - Probe/ Programmer S/N: 1085508066 - Device "R9A02G021" selected. - Target interface speed: 4000 kHz (Fixed) - VTarget = 3.300V - ConfigTargetSettings() start - ConfigTargetSettings() end - Took 16us - TotalIRLen = 5, IRPrint = 0x05 - JTAG chain detection found 1 devices: - #0 Id: 0x00000001, IRLen: 05, Unknown device - Assuming RISC-V TAP with DTM setup - Debug architecture: - RISC-V debug: 0.13 - AddrBits: 14 - DataBits: 32 - IdleClks: 4 - Memory access: - Via system bus: No - Via ProgBuf: No (0 ProgBuf entries) - Via abstract command (AAM): May be tried as last resort - DataBuf: 0 entries - autoexec[0] implemented: No - Failed to temporarily halt core during identification - Attaching to core failed. Trying again with connect under reset (ndmreset-bit) - Memory access: - Detected: RV32 core - Temp. halting CPU for for feature detection... - CPU could not be halted - Connect failed. Resetting via Reset pin and trying again. - ConfigTargetSettings() start - ConfigTargetSettings() end - Took 10us - TotalIRLen = 5, IRPrint = 0x05 - JTAG chain detection found 1 devices: - #0 Id: 0x00000001, IRLen: 05, Unknown device - ERROR: Timeout while waiting for core to halt after reset and halt requestSpecific core setup failed. - CPU could not be halted - OnDisconnectTarget() start - OnDisconnectTarget() end - Took 18us - ERROR: Failed to connect.Could not establish a connection to target. - ERROR: Connect failed
[Log 2]:
Connecting ... - Connecting via USB to probe/ programmer device 0 - Probe/ Programmer firmware: J-Link OB-RA4M2 compiled Oct 9 2024 11:01:47 - Probe/ Programmer S/N: 1085508066 - Device "R9A02G021" selected. - Target interface speed: 4000 kHz (Fixed) - VTarget = 3.300V - ConfigTargetSettings() start - ConfigTargetSettings() end - Took 7us - Could not measure total IR len. TDO is constant high. - Failed to identify target. Resetting via Reset pin and trying again. - ConfigTargetSettings() start - ConfigTargetSettings() end - Took 6us - TotalIRLen = ?, IRPrint = 0x..000000000000000000000000 - Executing init sequence ... - ERROR: Could not perform target reset - ERROR: Failed to connect.Could not perform custom init sequence. - ERROR: Connect failed
[Log 3]:
Connecting the toolTool : COM port (COM5), Interface : 2 wire UARTConnecting to the target deviceSetting the target deviceDisconnecting the toolError(E100000C): A serial programming connection is prohibited for this device. (Command: 30, Response: DC)Operation failed.