MMU mapping must always be in the unit of a SPI_FLASH_MMU_PAGE_SIZE This macro is a helper for you to get needed page nums to be mapped. e.g.: Let's say SPI_FLASH_MMU_PAGE_SIZE is 64KB. - v_start = 0x4200_0004 - size = 4 * 64KB You should map from 0x4200_0000, then map 5 pages.