adiv5: Add a dummy read to the end of firmware_mem_write_sized() so we always wait on the write to ensure it's complete before any DP access can occur

This commit is contained in:
dragonmux 2022-08-08 00:56:48 +01:00 committed by Piotr Esden-Tempski
parent 7107d14bbc
commit 4c544bad28
1 changed files with 2 additions and 0 deletions

View File

@ -996,6 +996,8 @@ void firmware_mem_write_sized(ADIv5_AP_t *ap, uint32_t dest, const void *src, si
adiv5_dp_low_access(ap->dp, ADIV5_LOW_WRITE, ADIV5_AP_TAR, dest);
}
}
/* Make sure this write is complete by doing a dummy read */
adiv5_dp_read(ap->dp, ADIV5_DP_RDBUFF);
}
void firmware_ap_write(ADIv5_AP_t *ap, uint16_t addr, uint32_t value)