File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1012,6 +1012,16 @@ static int nuspi_read_flash_id(struct flash_bank *bank, uint32_t *id)
1012
1012
return ERROR_OK ;
1013
1013
}
1014
1014
1015
+ static int gdb_flash_write_end_callback (struct target * target ,
1016
+ enum target_event event , void * priv )
1017
+ {
1018
+ if (TARGET_EVENT_GDB_FLASH_WRITE_END == event )
1019
+ {
1020
+ if (nuspi_set_xip_read_cmd (priv ) != ERROR_OK )
1021
+ return ERROR_FAIL ;
1022
+ }
1023
+ }
1024
+
1015
1025
static int nuspi_probe (struct flash_bank * bank )
1016
1026
{
1017
1027
struct target * target = bank -> target ;
@@ -1066,6 +1076,8 @@ static int nuspi_probe(struct flash_bank *bank)
1066
1076
if (flash_reset (bank ) != ERROR_OK )
1067
1077
return ERROR_FAIL ;
1068
1078
1079
+ target_register_event_callback (gdb_flash_write_end_callback , bank );
1080
+
1069
1081
for (int i = 0 ; i < 4 ; i ++ ) {
1070
1082
if (nuspi_write_reg (bank , NUSPI_REG_SCKDIV , i ) != ERROR_OK )
1071
1083
continue ;
You can’t perform that action at this time.
0 commit comments