Skip to main content
pcu
Associate III
June 12, 2017
Solved

FMC hardfault STM32L471

  • June 12, 2017
  • 2 replies
  • 808 views
Posted on June 12, 2017 at 17:12

Hello,

I tried my LCD with parallel FMC-16bit on the NucleoL496 kit. All is working so far so good.

Now I working on my board and this is a L471 processor.

The problem is that it crashes when I try to writing to FMC(0x60000000). It goes directly in hardfault.

Only FMC is activated and the difference between the two project are the number of pin (100 vs 144) and the model (L471 vs L496)

An idea what happens?

Pierre

    This topic has been closed for replies.
    Best answer by Tesla DeLorean
    Posted on June 12, 2017 at 17:22

    Check that the FMC is properly initialized, compare the register settings between working and non-working example. ie dump the registers, compare and contrast.

    2 replies

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    June 12, 2017
    Posted on June 12, 2017 at 17:22

    Check that the FMC is properly initialized, compare the register settings between working and non-working example. ie dump the registers, compare and contrast.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    pcu
    pcuAuthor
    Associate III
    June 12, 2017
    Posted on June 12, 2017 at 21:15

    Yes you are right.

    After compare I remember that I chanded the stm32l4xx_ll_fmc.c file because it didn't enable the FMC in FMC_NORSRAM_Init().

    It is neccessary to add __FMC_NORSRAM_ENABLE(Device, Init->NSBank);

    Than you.