A chip to be considered a cpu, should have at least a 1 control unit (cu) , 1 arithmetic logic unit (alu) and some registers,
The alu has register bank (aka a bunch of registers), the cortex-M has 16 registers and 5 special registers. The 16 register are divided into 13 (r0 to r12) general purpose registers, a stack pointer (sp) which can be ‘the main sp’ or ‘program sp’ depending on the mode of execution. The stack pointer register is a specialized CPU register used to keep track of the top of the stack
<aside> 💡
By default the any firmware you write starts executing in Handler mode (the privileged mode) that uses the msp. The bit 1 of the Control register indicates if the msp or psp is in use.
</aside>
Link Register (LR) contains the return address after a function is done
Program counter (PC), also known as the instruction pointer or instruction address register, is a special register within a computer's central processing unit (CPU) that stores the memory address of the next instruction to be executed.
Thumb is a compressed instruction set architecture used in ARM processors that provides: