We've had a couple of R7FA6E10F2CFP that only seem to program once, and that's it. We are using P&E programmers in our production, and no bits are changing in the chip configuration. They will no longer erase. I've tried downloading Renesas Flash Programmer, and tried using the J-Link to try to clear it up, but it just reports that the erase operation failed. Is there a way to get them working again? More importantly, what causes them to get this way?
Hello,
On Renesas Flash Programmer select J-Link and 2-wire UART interface and try to initialize the device from Target device->Initialize Device.
Does it fail ? If yes what are the error logs ?
Also what J-Link debugger are you using ?
Hi, I have no option to select 2-wire UART interface, and I have no "Initialize Device" option under target device. I am using the J-Link Base, and using the SWD connection.
This is the error I get when I try to erase.
I tried reading the option setting memory, it is all 0xFF.
Try to set the above mentioned settings when creating a new RFP project.
This is the result. How is it going to work over UART if the J-Link is connected using the SWD pins?
When I create the project in RFP I can select between 2-wire UART and SWD
I suspect that once you have created a project using SWD, this cannot be changed, and you would need to create a new project.
I created a new project, and selected 2-wire UART. As you can see from the screen shot, it didn't work. Do the SWD pins (SWCLK, SWDIO) work as UART pins? I only have an SWD connection to the chip.
Please check the power supply of the device. How have you connected VCL pin ?
Do you have a custom board or FPB-RA6E1 ? If it is a custom board can you share the schematic of MCU ?
The Initialize command is executed in boot mode. J-Link can support serial programming over via 2-wire UART if the SCI9 UART pins are connected to the TDO/TDI pins and P300/SWCLK are connected with P201/MD pins.
Otherwise you can use a USB-to-UART converter and connect to SCI9 UART pins or use the USBFS port to enter boot mode.
Here's part of the schematic, it's a custom board. I think I'm stuck then, because P109 and P110 are used for SPI going to other hardware on the board and not brought out. P201 is pulled high by a resistor and not brought out. The USB pins are not connected to anything. So, there is no way to restore it over SWD, it can only be done over USB or UART? We've programmed hundreds of boards with no problem, not sure what happened to these two boards that only programmed once. It's concerning that there is a possibility that boards could go out without being able to update in the field, we have a customized application that can do flash updates over CAN. What could be causing the chip to get into this state?
Ok, so the serial programming interface that is used in boot mode is totally disabled at the moment because neither communication interface is connected and also MD pin is high.
If the MD pin is pulled up high, the device cannot enter boot mode. The device enters boot mode when MD=0 at the moment of reset release.
If you could manage to run the Initialize command, you would get the response of the device to the command and thus the nature of the error.
Can you double check the value of SAS : Startup Area Setting Register at 0x0100_A134 ?
Also, are those chips virgin/unprogrammed ?
If the power supply voltage is flawless, the device could be electrically damaged.
The chips were programmed once through SWD. The programmer makes no changes to the option setting memory. I've read out the option setting memory, the region at 0x0100A134 is 0xFFFFFFFF. I guess we can only assume these were damaged somehow, but we've never seen this failure before. The boards are running our production test software correctly, they just can't be reprogrammed.
What about the values of below registers ?
Which compiler/IDE have you used to generated the program file you program on the devices ?
Those are 0xFFFFFFFF as well, and the entire option setting region from 0x0100A100-0x0100A2FF is 0xFFFFFFFF. The program is generated with E2Studio and GCC. FSP version is 5.0.
It seems that the device is damaged somehow. Just in case, what does J-Link commander returns when you try to erase ?