Skip to content

Commit 733d785

Browse files
committed
When reading BB marker, store it at the correct buffer offset
1 parent 665a1b8 commit 733d785

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

firmware/programmer/nand_programmer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ static int np_read_bad_block_info_from_page(np_prog_t *prog, uint32_t block,
350350
{
351351
uint32_t status, addr = block * prog->chip_info.block_size;
352352

353-
status = nand_read_spare_data(prog->page.buf, page,
354-
prog->chip_info.bb_mark_off, 1);
353+
status = nand_read_spare_data(&prog->page.buf[prog->chip_info.page_size +
354+
prog->chip_info.bb_mark_off], page, prog->chip_info.bb_mark_off, 1);
355355
if (status == NAND_INVALID_CMD)
356356
{
357357
status = nand_read_page(prog->page.buf, page,

0 commit comments

Comments
 (0)