Keil Logo

MCBSTR9: Memory Mismatch During Target Debugging


Information in this support solution applies to:

  • ST Microelectronics controller STR91xFA Rev H

QUESTION

I am using a STR91xFA Rev H controller and when I start a Target Debug Session after flashing my application I always get:

Memory Mismatch error at address 0x00008000

How can I avoid this error?

ANSWER

Boot bank size register (FMI_BBSR) is 0 after reset which defines the default size of the Boot bank as 32kB. Therefore when the debugger connects after reset only the first 32kB (up to address 0x8000) is mapped physically and verify fails above this address.

There are two possible ways to avoid the verify error:

  • Disable Verify Code Download under debugger options. This will avoid the error but will also skip verify.
  • Use a script which maps the whole flash before loading the application. Load Application at Startup must be disabled and loading must be executed via the following initialization file instead:
     _WDWORD(0x54000000, 0x00000004);  // Boot Bank Size = 512kB
     LOAD filename.axf
     g,main
    
    This method verifies the load also.

All this applies only to STR91xFA Rev H devices. All chips before (STR91xFA Rev G and STR91xF Rev B, Rev D) do not reset FMI_BBSR (documented in Errata sheet) and therefore after the application configured FMI_BBSR once it stays configured. Also when debugger connects and resets the target it does not affect the FMI_BBSR and mapping stays active and verify works. Verify fails on those chips only when blank chips where programmed with code larger then 32kB.

Disable Use Reset at Startup under debugger options will not reset the target and the mapping and verify will also work if the application already configured FMI_BBSR. However above mentioned methods should be used instead.

SEE ALSO

Last Reviewed: Wednesday, January 13, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.