Skip to content

Commit 993b642

Browse files
zaporozhetskartben
authored andcommitted
drivers: flash: sam0: Fix incorrect page write size
According to the datasheet, one page is made of 64 bytes and one row is made of 4 pages, that is 256 bytes. This MR fixes the incorrect page write size for sam0 and sets it to 64 bytes. Signed-off-by: Taras Zaporozhets <[email protected]>
1 parent 00eafee commit 993b642

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/flash/flash_sam0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static int flash_sam0_commit(const struct device *dev, off_t base)
224224
for (page = 0; page < PAGES_PER_ROW; page++) {
225225
err = flash_sam0_write_page(
226226
dev, base + page * FLASH_PAGE_SIZE,
227-
&ctx->buf[page * FLASH_PAGE_SIZE], ROW_SIZE);
227+
&ctx->buf[page * FLASH_PAGE_SIZE], FLASH_PAGE_SIZE);
228228
if (err != 0) {
229229
return err;
230230
}

0 commit comments

Comments
 (0)