You are reading a single comment by @JumJum and its replies. Click here to read the full conversation.
  • Well maybe using the XIP region where flash is actually mapped would be good idea.­0/rp2040-datasheet.pdf#page=150
    2.6.3. Flash

    Not sure how writing to flash works when XIP is enabled, it will probably block executing from flash in similar way as on nrf5x where any execution is halted when erasing/writing.
    How does it work on ESP32/8266? It is exactly the same problem there.

  • reading directly from flash works fine
    writing needs disabling of irq
    If somebody has a better solution, you are welcome

    mask = getIrqMask();
      flash_range_program(FLASH_TARGET_OFFSET,­ addr + i * FLASH_PAGE_SIZE, FLASH_PAGE_SIZE);

Avatar for JumJum @JumJum started