From 9bc2824d46c752b1ca702d2a5b0c4258c1169eeb Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 4 Aug 2020 11:33:35 +0200 Subject: [PATCH] fixup! fixup! cpu/sam0_common: flashpage: split RWWEE and normal functions --- cpu/sam0_common/periph/flashpage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpu/sam0_common/periph/flashpage.c b/cpu/sam0_common/periph/flashpage.c index de813870c4179..92685aed364e1 100644 --- a/cpu/sam0_common/periph/flashpage.c +++ b/cpu/sam0_common/periph/flashpage.c @@ -136,7 +136,9 @@ static void _erase_page(void* page, void (*cmd_erase)(void)) /* erase given page (the ADDR register uses 16-bit addresses) */ _unlock(); - /* ??? */ + /* ADDR drives the hardware (16-bit) address to the NVM when a command is executed using CMDEX. + * 8-bit addresses must be shifted one bit to the right before writing to this register. + */ #if defined(CPU_SAMD21) || defined(CPU_SAML21) page_addr >>= 1; #endif