- change str9 flash controller to read array after a level 1 protect
git-svn-id: svn://svn.berlios.de/openocd/trunk@619 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
1c50c0f3c7
commit
5d6c997b51
|
@ -216,6 +216,7 @@ int str9x_protect_check(struct flash_bank_s *bank)
|
|||
target_read_u16(target, adr, (u16*)&status);
|
||||
}
|
||||
|
||||
/* read array command */
|
||||
target_write_u16(target, adr, 0xFF);
|
||||
|
||||
for (i = 0; i < bank->num_sectors; i++)
|
||||
|
@ -304,6 +305,12 @@ int str9x_protect(struct flash_bank_s *bank, int set, int first, int last)
|
|||
|
||||
/* query status */
|
||||
target_read_u8(target, adr, &status);
|
||||
|
||||
/* clear status, also clear read array */
|
||||
target_write_u16(target, adr, 0x50);
|
||||
|
||||
/* read array command */
|
||||
target_write_u16(target, adr, 0xFF);
|
||||
}
|
||||
|
||||
return ERROR_OK;
|
||||
|
|
Loading…
Reference in New Issue