**flash_range_erase** must be called before calling **flash_range_program**. Otherwise **flash_range_program** will not work. To test this behavior , just comment line 40 in flash_program example. Could you please add a comment in the header file **rp2_common/hardware_flash/include/hardware/flash.h** to indicate this. This is not obvious and it may save a lot of time to a lot of people. Thanks