'Juha Niskanen (Haltian)' email@example.com [nuttx]
2018-02-19 13:17:54 UTC
This patch series resolves issue reported by Pascal Speck and fixes STM32L4 driver to support arbitrary length, unaligned writes and multiple writes to same page as expected by mtd-progmem and mtd-config. In latter case, full erase is needed to work around silicon limitations.
One question: should arch/arm/src/samv7/sam_progmem.c line 673
dest = (FAR uint32_t *)address;
be changed to:
dest = (FAR uint32_t *)((uint8_t *)address - offset);
in order to align the page buffer write to page boundary (when offset != 0 SAM writes full page but crossing page boundaries)? Patch does NOT do this, as I have no board to test SAM arch. It would be great if someone could test that /dev/config backed by SAM progmem works.
0001: STM32L4: stm32l4_flash: change flash programming to use page buffer for unaligned writes.
0002: mtd/config: remove MTD_ERASE that was erasing data block instead of erase block
0003: mtd/config: add still more error handling (to detect bad underlying flash implementations)