I solved this by bailing on writing to flash. I now store the device name to SFLASH, row 1.
1 of 1 people found this helpful
SFLASH will work, but there is another API that is suitable for this purpose and may be preferable under some circumstances (i.e. SFLASH is retained across SWD reflashing, while this other method is not). The API is CyBle_StoreAppData(). You can see some discussion and example snippets in this forum topic: