Skip to main content
Visitor II
January 27, 2020
Question

STM32 lwip stack issue - frames/not received/processed - FBE error FBE bit 12 -Fatal bus error.

  • January 27, 2020
  • 2 replies
  • 1093 views

STM32 lwip stack issue - frames/not received/processed - FBE error

FBE bit 12 -Fatal bus error. STM board used : STMh743

is there any timing problem or a configuration problem with the clock, bus speed or DMA?

    This topic has been closed for replies.

    2 replies

    Visitor II
    June 3, 2020

    Hi Anand,

    Have you solve the problem? I encounter the same problem with you.

    Best regards.

    Anand RamAuthor
    Visitor II
    July 3, 2020

    not yet :( , we are in contact with stm colleagues to fix this.once i got the solution will inform you

    Visitor II
    June 3, 2020

    Oh, i solved the problem.

    lwip mem_malloc zone should be in RAM3.

    the macro LWIP_RAM_HEAP_POINTER should be defined with 0x30044000

    and, MEM_LIBC_MALLOC should be zero

    Explorer
    June 4, 2020

    >the macro LWIP_RAM_HEAP_POINTER should be defined with 0x30044000

    Instead, consider using the linker to place your variables at memory addresses. That's what the linker's for.

    lwIP does this with LWIP_RAM_HEAP_POINTER:

     ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER);

    No checks. The compiler can't know the linker hasn't placed something else there. You'd have to remember, and as your project grows and/or more developers join your team, that detail could be easily forgotten.

    For example, take a look at my map file. If I'd defined that macro like that, my .EthDescriptorsBlock section would become corrupted.

    .EthTxBlock 0x30040000 0x4e30
     0x30040000 . = ALIGN (0x4)
     0x30040000 __ETH_TX_START = .
     *(.TxArraySection)
     .TxArraySection
     0x30040000 0x4e30 Common\Eth\LWIP\Target\ethernetif.o
     0x30040000 lwip_custom_ram_heap
     0x30044e30 __ETH_TX_END = .
     
    .EthDescriptorsBlock
     0x30044e30 0x5d0
     0x30045000 . = ALIGN (0x400)
     *fill* 0x30044e30 0x1d0 
     0x30045000 __ETH_DESCRIPTORS_START = .
     *(.RxDecripSection)
     .RxDecripSection
     0x30045000 0x180 Common\Eth\LWIP\Target\ethernetif.o
     0x30045000 DMARxDscrTab
     *(.TxDecripSection)
     .TxDecripSection
     0x30045180 0x180 Common\Eth\LWIP\Target\ethernetif.o
     0x30045180 DMATxDscrTab
     0x30045400 . = ALIGN (0x400)
     *fill* 0x30045300 0x100 
     0x30045400 __ETH_DESCRIPTORS_END = .

    If you're using GCC, take a look at my ethernetif.c and linker command file attached at https://community.st.com/s/question/0D50X0000C6eNNSSQ2/bug-fixes-stm32h7-ethernet for an example of how to use compiler attributes to get the linker to place the lwIP heap in RAM3.