Stack pointer is setup to incorrect alignment (STM32)

Technical Note 82023

Arkitekturer:

ARM

Komponent:

debugger

Uppdaterad:

2015-11-06 11:10

Introduction

Programming an STM32 device fails with the message:

Warning: Stack pointer is setup to incorrect alignment. Stack addr=0xAAAAAAAA

Background

STM32 devices can be read protected. When read protection is enabled, bytes in flash memory will be read out as 0xAA. When the Cortex-M device starts up, the bytes at 0x00 to 0x03 are read, as they hold the value of the stack pointer, and in that situation the value 0xAAAAAAAA is regarded as invalid.

Solution

The flash of the STM32 device needs to be erased. With I-jet, unlock utilities for STM32 devices are provided as C-SPY macros found in the C-SPY Macro Quicklaunch window. With J-Link, arm\bin\JLinkSTM32.exe can be used.

All product names are trademarks or registered trademarks of their respective owners.

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av iar.com rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.