This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sd_flash_write operation won't finish when p_src isn't 4 aligned

Hello. During development with the nrf52832 on the nRF52DK I've encountered a problem regarding the flash operations. When I try to perform a sd_flash_write operation, but the p_src isn't divisible by 4 (for example 0x20007DCD), the flash operation will never end, and nor the NRF_EVT_FLASH_OPERATION_SUCCESS or  NRF_EVT_FLASH_OPERATION_ERROR will be called. Is this an expected behavior? Is it mentioned somewhere in the documentation? I have only seen posts telling that the p_dst has to be divisible by 4 which is understanable.

Originally I've encountered the problem while trying to copy a  36-byte __packed structure from RAM to the FLASH. The address in RAM was 0x20007DCD and writing the first word would never end. When I removed the __packed qualifier, the RAM address shifted to 0x20007DD0 and the operation would end successfully.

Additional information: I am using SoftDevice 132, when performing flash operations I use the sd_flash_write and sd_flash_page_erase funtions and let the scheduler execute app_sched_execute() untill an flash event arrives.

Best regards

Parents Reply Children
No Data
Related