Skip to main content
Explorer II
June 24, 2024
Solved

getting stuck into hard fault handler

  • June 24, 2024
  • 1 reply
  • 895 views

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

    This topic has been closed for replies.
    Best answer by KDJEM.1

    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

    1 reply

    KDJEM.1Answer
    Technical Moderator
    July 5, 2024

    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