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 610118b commit 8f49ae5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/target/stm32l4.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,10 @@ static bool stm32l4_attach(target_s *const target)
} else
stm32l4_add_flash(target, STM32L4_FLASH_BANK_1_BASE, flash_len * 1024U, 0x800, UINT32_MAX);

/* On STM32G47x SoC, Cortex-M4F allows SRAM access without halting */
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 8f49ae5

Please sign in to comment.