Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/target/adiv5.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,9 +679,10 @@ adiv5_access_port_s *adiv5_new_ap(adiv5_debug_port_s *dp, uint8_t apsel)

if (!tmpap.idr) /* IDR Invalid */
return NULL;
tmpap.csw = adiv5_ap_read(&tmpap, ADIV5_AP_CSW);
tmpap.csw &= ~(ADIV5_AP_CSW_SIZE_MASK | ADIV5_AP_CSW_ADDRINC_MASK);
tmpap.csw |= ADIV5_AP_CSW_DBGSWENABLE;
//tmpap.csw = adiv5_ap_read(&tmpap, ADIV5_AP_CSW);
//tmpap.csw &= ~(ADIV5_AP_CSW_SIZE_MASK | ADIV5_AP_CSW_ADDRINC_MASK);
//tmpap.csw |= ADIV5_AP_CSW_DBGSWENABLE;
tmpap.csw = 0x23000012U;

if (tmpap.csw & ADIV5_AP_CSW_TRINPROG) {
DEBUG_WARN("AP %d: Transaction in progress. AP is not usable!\n", apsel);
Expand Down
Loading