Skip to content

Commit

Permalink
flash: Warn on SFDP read failure and debug print page size
Browse files Browse the repository at this point in the history
  • Loading branch information
tannewt committed Aug 10, 2023
1 parent 3d4d633 commit a7131c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/target/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ spi_flash_s *bmp_spi_add_flash(target_s *const target, const target_addr_t begin
spi_parameters.sector_size = 4096U;
spi_parameters.capacity = length;
spi_parameters.sector_erase_opcode = SPI_FLASH_OPCODE_SECTOR_ERASE;
DEBUG_WARN("SFDP read failed. Using best guess.\n");
}
DEBUG_INFO("Flash size: %" PRIu32 "MiB\n", (uint32_t)spi_parameters.capacity / (1024U * 1024U));
DEBUG_INFO("Flash page size: %" PRIu32 "B\n", (uint32_t)spi_parameters.page_size);

target_flash_s *const flash = &spi_flash->flash;
flash->start = begin;
Expand Down

0 comments on commit a7131c4

Please sign in to comment.