Skip to content

Commit af49c40

Browse files
committed
Reset NAND on init
1 parent 2c5d521 commit af49c40

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

firmware/programmer/fsmc_nand.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ static void nand_print_fsmc_info()
138138
DEBUG_PRINT("Status command: %d\r\n", fsmc_conf.status_cmd);
139139
}
140140

141+
static void nand_reset()
142+
{
143+
*(__IO uint8_t *)(Bank_NAND_ADDR | CMD_AREA) = fsmc_conf.reset_cmd;
144+
}
145+
141146
static int nand_init(void *conf, uint32_t conf_size)
142147
{
143148
if (conf_size < sizeof(fsmc_conf_t))
@@ -148,6 +153,7 @@ static int nand_init(void *conf, uint32_t conf_size)
148153
nand_gpio_init();
149154
nand_fsmc_init(fsmc_conf);
150155
nand_print_fsmc_info();
156+
nand_reset();
151157

152158
return 0;
153159
}

0 commit comments

Comments
 (0)