Skip to content

Commit

Permalink
stm32l4: Enable non-halting SRAM access for RTT on STM32G47x
Browse files Browse the repository at this point in the history
  • Loading branch information
ALTracer committed Jan 6, 2025
1 parent 7b381b9 commit f9c6183
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/target/stm32l4.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,9 @@ static bool stm32l4_attach(target_s *const target)
} else
stm32l4_add_flash(target, STM32L4_FLASH_BANK_1_BASE, flash_len * 1024U, 0x800, UINT32_MAX);

/* STM32G47x SoC allows the debugger to read SRAM while CM4 is running */
if (device->device_id == ID_STM32G47)
target->target_options |= TOPT_NON_HALTING_MEM_IO;
/* Clear all errors in the status register. */
stm32l4_flash_write32(target, FLASH_SR, stm32l4_flash_read32(target, FLASH_SR));
return true;
Expand Down

0 comments on commit f9c6183

Please sign in to comment.