Example: bachelor of science

PM0056 Programming manual - STMicroelectronics

December 2017 DocID15491 Rev 61/1561PM0056 Programming manualSTM32F10xxx/20xxx/21xxx/L1xxxx Cortex -M3 Programming manualIntroductionThis Programming manual provides information for application and system-level software developers. It gives a full description of the STM32F10xxx/20xxx/21xxx/L1xxxx Cortex -M3 processor Programming model, instruction set and core STM32F10xxx/20xxx/21xxx/L1xxxx Cortex -M3 processor is a high performance 32-bit processor designed for the microcontroller market. It offers significant benefits to developers, including: Outstanding processing performance combined with a fast interrupt handling Enhanced system debug with extensive breakpoint and trace capabilities Efficient processor core, system and memories Ultra-low-power consumption with integrat

extensively optimized design, providing high-end processing hardware including single-cycle 32x32 multiplication and dedicated hardware division. italic Highlights important notes, introduces special terminology, denotes internal cross-references, and citations.

Tags:

  Manual, Hardware, Programming, Programming manual

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of PM0056 Programming manual - STMicroelectronics

1 December 2017 DocID15491 Rev 61/1561PM0056 Programming manualSTM32F10xxx/20xxx/21xxx/L1xxxx Cortex -M3 Programming manualIntroductionThis Programming manual provides information for application and system-level software developers. It gives a full description of the STM32F10xxx/20xxx/21xxx/L1xxxx Cortex -M3 processor Programming model, instruction set and core STM32F10xxx/20xxx/21xxx/L1xxxx Cortex -M3 processor is a high performance 32-bit processor designed for the microcontroller market. It offers significant benefits to developers, including: Outstanding processing performance combined with a fast interrupt handling Enhanced system debug with extensive breakpoint and trace capabilities Efficient processor core, system and memories Ultra-low-power consumption with integrated sleep modes Platform Rev 6 Contents1 About this document.

2 Conventions .. of abbreviations for registers .. the STM32 Cortex -M3 processor and core peripherals .. level interface .. configurable debug .. -M3 processor features and benefits summary .. -M3 core peripherals .. 122 The Cortex -M3 processor .. model .. mode and privilege levels for software execution .. registers .. and interrupts .. types .. Cortex microcontroller software interface standard (CMSIS) .. model .. regions, types and attributes .. system ordering of memory accesses.

3 Of memory accesses .. ordering of memory accesses .. endianness .. primitives .. hints for the synchronization primitives .. model .. states .. types .. handlers .. table .. priorities .. priority grouping .. entry and return .. 37 DocID15491 Rev 63 handling .. types .. escalation and hard faults .. status registers and fault address registers .. management .. sleep mode .. from sleep mode .. external event input .. management Programming hints.

4 433 The Cortex -M3 instruction set .. set summary .. functions .. the instruction descriptions .. when using PC or SP .. second operand .. operations .. alignment .. expressions .. execution .. width selection .. access instructions .. and STR, immediate offset .. and STR, register offset .. and STR, unprivileged .. , PC-relative .. and STM .. and POP .. and STREX .. data processing instructions .. , ADC, SUB, SBC, and RSB .. , ORR, EOR, BIC, and ORN.

5 75 ContentsPM00564/156 DocID15491 Rev , LSL, LSR, ROR, and RRX .. and CMN .. and MVN .. , REV16, REVSH, and RBIT .. and TEQ .. and divide instructions .. , MLA, and MLS .. , UMLAL, SMULL, and SMLAL .. and UDIV .. instructions .. and USAT .. instructions .. and BFI .. and UBFX .. and UXT .. and control instructions .. , BL, BX, and BLX .. and CBNZ .. and TBH .. instructions .. 1044 Core peripherals .. 105 DocID15491 Rev 65 the STM32 core peripherals .. protection unit (MPU).

6 Access permission attributes .. mismatch .. an MPU region .. design hints and tips .. type register (MPU_TYPER) .. control register (MPU_CR) .. region number register (MPU_RNR) .. region base address register (MPU_RBAR) .. region attribute and size register (MPU_RASR) .. vectored interrupt controller (NVIC) .. CMSIS mapping of the Cortex -M3 NVIC registers .. set-enable registers (NVIC_ISERx) .. clear-enable registers (NVIC_ICERx) .. set-pending registers (NVIC_ISPRx) .. clear-pending registers (NVIC_ICPRx).

7 Active bit registers (NVIC_IABRx) .. priority registers (NVIC_IPRx) .. trigger interrupt register (NVIC_STIR) .. and pulse interrupts .. design hints and tips .. register map .. control block (SCB) .. control register (SCB_ACTLR) .. base register (SCB_CPUID) .. control and state register (SCB_ICSR) .. table offset register (SCB_VTOR) .. interrupt and reset control register (SCB_AIRCR) .. control register (SCB_SCR) .. and control register (SCB_CCR) .. handler priority registers (SHPRx).

8 Handler control and state register (SCB_SHCSR) .. fault status register (SCB_CFSR) .. fault status register (SCB_HFSR) .. management fault address register (SCB_MMFAR) .. fault address register (SCB_BFAR) .. 147 ContentsPM00566/156 DocID15491 Rev control block design hints and tips .. register map .. timer (STK) .. control and status register (STK_CTRL) .. reload value register (STK_LOAD) .. current value register (STK_VAL) .. calibration value register (STK_CALIB) .. design hints and tips.

9 Register map .. 1545 Revision history .. 155 DocID15491 Rev 67/156PM0056 List of tables8 List of tablesTable of processor mode, execution privilege level, and stack use options.. 14 Table register set summary .. 15 Table register combinations .. 16 Table bit definitions .. 17 Table bit definitions .. 18 Table bit definitions .. 19 Table register bit definitions.. 20 Table register bit definitions .. 20 Table register bit assignments .. 21 Table register bit definitions .. 22 Table of memory accesses.

10 25 Table access behavior .. 26 Table memory bit-banding regions .. 28 Table memory bit-banding regions .. 28 Table compiler intrinsic functions for exclusive access instructions .. 31 Table of the different exception types .. 33 Table return behavior .. 39 Table .. 40 Table status and fault address registers .. 41 Table instructions .. 44 Table intrinsic functions to generate some Cortex-M3 instructions .. 49 Table intrinsic functions to access the special registers.. 50 Table code suffixes.