This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MemManage Fault

Hello,

I'm looking into a Memmanage Fault which occurs in a project developed with Keil 3.40. It happens after long time after power up. The memmanage handler is B . (a branch to itself).

In this link (img337.imageshack.us/.../memmanagefault.jpg) there's a uVision screenshot. In the memory area there's the MSP stack, in Disassemble area there's the program I think it was been executing when abort occurred.

In 0x080072E4 there's a PUSH {R4,LR} instruction.

This software runs on a STM32F103R8, which has 20KB RAM (0x20000000-0x20004FFF) and 64KB of Flash (0x08000000-0x0800FFFF). I don't figure why the Memmanage fires. Pointers were pointing in RAM area. Can someone helps me, please?

Best regards,

Lorenzo

  • Are the data correctly aligned too? Just pointing into readable/writeable memory isn't enough if the processor is trying a 16-bit or 32-bit read/write.

  • Hello,

    thanks for your answer.
    I think the instruction in 0x08006F0C was executed successfully (R4 was 0x20002F78) and also the next one (MOV r0, r4) because r0 and r4 were equal. I don't know the value of r0 in 0x08006F0A because MOV r0, r4 had overwritten r0 with r4, but I don't think this could fired the abort because next instructions seem being executed.

    Thanks in advance,

    Lorenzo

  • Definitive guide to the ARM Cortex-M3

    ==>

    The NVIC contains a Memory Management Fault Status Register (MFSR) to indicate the
    cause of the memory management fault. If the status register indicates that the fault is a data
    access violation (DACCVIOL bit) or an instruction access violation (IACCVIOL bit), the
    offending code can be located by the stacked program counter. If the MMARVALID bit in the
    MFSR is set, it is also possible to determine the memory address location that caused the fault
    from the Memory Management Address Register (MMAR) in the NVIC.

  • Hello,

    thanks for your help.
    This could be very useful, but unfortunately not in my case, I think...
    This register is 0x400... all significative bits are zero.

    thanks in advance!

    Lorenzo