1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/periph_flashpage
Gunar Schorcht c21eb6b8a8 tests/periph_flashpage: use od_hex_dump for memdump
Replaces the custom `memdump` implementation with `od_hex_dump`, which provides a more common and especially more compact print format.
2023-01-07 14:49:36 +01:00
..
tests tests/periph_flashpage: Add _in_address_space feature tests 2022-03-17 19:46:00 +01:00
app.config.test tests/periph_flashpage: use od_hex_dump for memdump 2023-01-07 14:49:36 +01:00
Kconfig tests/periph_flashpage: Add _in_address_space feature tests 2022-03-17 19:46:00 +01:00
main.c tests/periph_flashpage: use od_hex_dump for memdump 2023-01-07 14:49:36 +01:00
Makefile tests/periph_flashpage: use od_hex_dump for memdump 2023-01-07 14:49:36 +01:00
Makefile.ci tests: skip nucleo-l011k4 where it doesn't fit 2020-10-15 18:52:51 +02:00
README.md tests/periph_flashpage: small cleanup 2018-03-16 15:20:54 +01:00

Expected result

Use the provided shell commands to read and write pages from/to the MCU's internal flash memory. For altering the data in a flash page, use a sequence similar to this:

  • read some page from the flash, this will load this page into a local buffer
read 100
  • edit the contents of the local buffer, here we write 'Hello_RIOT' to position 100
edit 100 Hello_RIOT
  • write the local buffer to any target page in the flash. CAUTION: if you override any page, that contains program code (or even the interrupt vector), you will most like encounter hard faults and crashes which can only be fixed by re-flashing the node...
write 100
  • check if the contents were written
dump 100
  • now power off the node, wait a bit and power it back on. The contents of the page written previously should still be there

What else to check:

  • Erase a page with previously known contents, to make sure the erasing works
  • also check the pages before and after the targeted page, to see if the page size is correct, and that you are only erasing the actual page and not any parts of the neighboring page.

Background

This test application provides shell commands to verify the implementations of the flashpage peripheral driver interface.