cancel
Showing results for 
Search instead for 
Did you mean: 

getting stuck into hard fault handler

rahul7515
Associate III

i am using stm3210e eval board. It has NAND flash memory of 512 Mbit and I am trying to read data from it but it gets inside hard fault handler. although i am able to read the device ID

Below is the code

NAND_IDTypeDef nand[1];
HAL_NAND_Read_ID(&hnand1,nand);
uint8_t read[10] = {0};
NAND_AddressTypeDef addr = {0,0,0};
HAL_NAND_Read_Page_8b(&hnand1,&addr,read,1);

 

the ioc file configuration 

Screenshot 2024-06-24 162932.png

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hello @rahul7515 ,

 

Could you please take a look at  FSMC_NAND and check you configuration.

The goal of this example is to explain the different steps to configure the FSMC and make the NAND device ready for access. 

In this example, the NAND device is configured and initialized explicitly following all initialization sequence steps. After initializing the device, user can perform erase/read NAND ID/read data/write data operations on it.

May this FAQ can help you to debug a HardFault  How to debug a HardFault on an Arm Cortex®-M STM32 - STMicroelectronics Community

I hope this help you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
KDJEM.1
ST Employee

Hello @rahul7515 ,

 

Could you please take a look at  FSMC_NAND and check you configuration.

The goal of this example is to explain the different steps to configure the FSMC and make the NAND device ready for access. 

In this example, the NAND device is configured and initialized explicitly following all initialization sequence steps. After initializing the device, user can perform erase/read NAND ID/read data/write data operations on it.

May this FAQ can help you to debug a HardFault  How to debug a HardFault on an Arm Cortex®-M STM32 - STMicroelectronics Community

I hope this help you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.