Skip to content

Commit b51fa1b

Browse files
authored
Mark flash_devinfo_ptr() as RAM code to avoid flash call during flash_range_erase() (#2235)
1 parent 0d90992 commit b51fa1b

File tree

1 file changed

+1
-1
lines changed
  • src/rp2_common/hardware_flash

1 file changed

+1
-1
lines changed

src/rp2_common/hardware_flash/flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ void flash_get_unique_id(uint8_t *id_out) {
288288
#if !PICO_RP2040
289289
// This is a static symbol because the layout of FLASH_DEVINFO is liable to change from device to
290290
// device, so fields must have getters/setters.
291-
static io_rw_16 * flash_devinfo_ptr(void) {
291+
static io_rw_16 * __no_inline_not_in_flash_func(flash_devinfo_ptr)(void) {
292292
// Note the lookup returns a pointer to a 32-bit pointer literal in the ROM
293293
io_rw_16 **p = (io_rw_16 **) rom_data_lookup_inline(ROM_DATA_FLASH_DEVINFO16_PTR);
294294
assert(p);

0 commit comments

Comments
 (0)