Hi to everybody,
I'm developing a progamming algorithm for the MC56F82736 for our flash programmer. I'm following what stated in the AN4981_On-Chip Flash Programming of 56F827xx.pdf and in the related sw.
The issues I encouter are the following:
1. After the execution of the masserase, that is using the 0x44 command, the microcontroller enters always a secured state. I implement exactly what present in the Application note above.
2. In order to avoid what indicated in point 1, immediatly after the chip erase command I need to program the Security Byte in the Flash Configuration Field to an unsecure value (that is SEC field in the FSEC register to $FE at flash address 0x40C). In this way the masserase passes, and the microcontroller is in an unprotected state.
3. The blankcheck command, that is the Read 1s All Block command (0x40), gives always a succes respons, that is indicates that the memory is blank though the memory is programmed.
Is there anyone that can help me to clarify this issues?
Thanks in advance for your reply
Regards
Stefano
Hi,
I think you will find information in this thread that can help you:
https://community.freescale.com/thread/339053
Here it is revealed how to clear the flash (and unlock it) using very basic JTAG commands, and not using the protocol of the flash unit itself.
Think of the flash unit as having an erase all PIN on it, and the JTAG being used to access this pin directly.
Hi,
I implemented what stated in the thread you indicated, but the memory remains still locked. I changed many delays values between 6 us e 16 ms but I can't still unlock the device.
In the following, in a metacode format, what implemented:
SetRESET(LOW)
usDelay(100);
// Software Reset to initialize TAP state machine
JTAG_RESET()
msDelay(10);
// Read ID_CODE
JTAG_GET_CHIP_TAP_IDCODE() ----> get 0x2980001D
//jtag::scan_out ir 8 5
JTAG_WRITE_CHIP_INSTR_REG(0x05)
//jtag::scan_out dr 4 1
JTAG_W_DATA4_REG(0x01)
//jtag::scan_out ir 8 9
JTAG_WRITE_CHIP_INSTR_REG(0x09)
//jtag::scan_out dr 16 1
JTAG_W_DATA16_REG(0x0001)
msDelay(1);
//jtag::scan_out dr 16 0
JTAG_W_DATA16_REG((0x0000)
Is there something that is still missing?
Thanks in advance for your reply
Stefano