Skip to content

Commit

Permalink
Reset NAND on init
Browse files Browse the repository at this point in the history
  • Loading branch information
bbogush committed Feb 14, 2021
1 parent 2c5d521 commit af49c40
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions firmware/programmer/fsmc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ static void nand_print_fsmc_info()
DEBUG_PRINT("Status command: %d\r\n", fsmc_conf.status_cmd);
}

static void nand_reset()
{
*(__IO uint8_t *)(Bank_NAND_ADDR | CMD_AREA) = fsmc_conf.reset_cmd;
}

static int nand_init(void *conf, uint32_t conf_size)
{
if (conf_size < sizeof(fsmc_conf_t))
Expand All @@ -148,6 +153,7 @@ static int nand_init(void *conf, uint32_t conf_size)
nand_gpio_init();
nand_fsmc_init(fsmc_conf);
nand_print_fsmc_info();
nand_reset();

return 0;
}
Expand Down

0 comments on commit af49c40

Please sign in to comment.