• LED with button
    I am using the STM32 G031K8 ARM CORTEX-M0 + development board. I am writing my code in Assembly language. I want the LED to light up when I add an external button and press this button. I have adjusted...
  • Cortex-M0+ hangs on return
    During debugging the Cortex-M0+ (ATSAMR21G18) all of a sudden hangs. Stack looks fine. LR contains the correct return address (odd), which based on the BX instruction description ( http://www.keil.com...
  • Compacting 4x 24 bit values into 3x 32 bits
    Hello, I have application running on an Cortex M3 MCU. The MCU runs a FIR filter which results in arrays of 32 bit values, but only the 24 least significant bits are used. Before storing this data to...
  • How to import C variable in an assembly code in a .s file
    I'm new of arm processor and I'd like to import a variable in a .s file the variable is definited in a c file: #define INIT_VAR 1 ....... extern uint32_t save_mem = INIT_VAR; or better I need...
  • Function Calls
    For Cortex M0+, what registers are used when a C function is called with; 1 parameter 2 parameters. Please give a simple example for each case (both C and Assembly). Thank you!