Browse Source

- 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
tags/v0.1.0
ntfreak 16 years ago
parent
commit
5d6c997b51
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/flash/str9x.c

+ 7
- 0
src/flash/str9x.c View File

@@ -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…
Cancel
Save