[riot-notifications] [RIOT-OS/RIOT] cpu/sam0_common: flashpage: add functions to write to user config area / AUX page (#14512)
notifications at github.com
Tue Nov 10 11:03:34 CET 2020
@benpicco commented on this pull request.
+ * @brief Write data to the user configuration area.
+ * This will write data to the remaining space after @see nvm_user_page_t
+ * The size of this area depends on the MCU family used.
+ * Will only write bits 1 -> 0. To reset bits to 1, call @see sam0_flashpage_aux_reset
+ * This will reset the whole user area configuration.
+ * Arbitrary data lengths and offsets are supported.
+ * @param offset Byte offset after @see nvm_user_page_t
+ * must be less than `FLASH_USER_PAGE_AUX_SIZE`
+ * @param data The data to write
+ * @param len Size of the data
+void sam0_flashpage_aux_write_raw(uint32_t offset, const void *data, size_t len);
We need to use different commands to write to that flash area.
Internally they already share functions for the actual flash write logic (which means also normal flash writes can be unaligned now) but this is a different flash region and we really don't accidentally overwrite the CPU configuration, a separate function is more convenient as otherwise we would have to add a check for the address inside `flashpage_write_raw()`and change the behavior based on that.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications