1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

tests/periph_flashpage: test_last_raw must erase page before write

This commit is contained in:
Federico Pellegrin 2018-12-20 21:18:52 +01:00
parent a0054654ee
commit 50f2078fcd

View File

@ -335,6 +335,9 @@ static int cmd_test_last_raw(int argc, char **argv)
/* try to align */
memcpy(raw_buf, "test12344321tset", 16);
/* erase the page first */
flashpage_write(((int)FLASHPAGE_NUMOF - 2), NULL);
flashpage_write_raw((void*) ((int)CPU_FLASH_BASE + (int)FLASHPAGE_SIZE * ((int)FLASHPAGE_NUMOF - 2)), raw_buf, strlen(raw_buf));
puts("wrote raw short buffer to last flash page");