220 likes | 355 Views
EFM32G840F128. muhammad yaqoob. System Summary. 32-bit processor running at up to 32 MHz Up to 128 KB Flash and 16 KB RAM memory Memory System Controller (MSC) The Memory System Controller (MSC) is the program memory unit of the EFM32G microcontroller Direct Memory Access Controller (DMA)
E N D
EFM32G840F128 muhammad yaqoob
System Summary • 32-bit processor running at up to 32 MHz • Up to 128 KB Flash and 16 KB RAM memory • Memory System Controller (MSC) The Memory System Controller (MSC) is the program memory unit of the EFM32G microcontroller • Direct Memory Access Controller (DMA) The Direct Memory Access (DMA) controller performs memory operations independently of the CPU. • Reset Management Unit (RMU) The RMU is responsible for handling the reset functionality of the EFM32G. • Energy Management Unit (EMU) The Energy Management Unit (EMU) manage all the low energy modes (EM) in EFM32G microcontrollers • Clock Management Unit (CMU) The Clock Management Unit (CMU) is responsible for controlling the oscillators and clocks on- the EFM32G board • Watchdog (WDOG)
System Summary • Pulse Counter (PCNT) The Pulse Counter (PCNT) can be used for counting pulses on a single input • Analog Comparator (ACMP) The Analog Comparator is used to compare the voltage of two analog inputs, with a digital output indicating which input voltage is higher • Voltage Comparator (VCMP) The Voltage Supply Comparator is used to monitor the supply voltage from software. An interrupt can be generated when the supply falls below or rises above a programmable threshold • Analog to Digital Converter (ADC) • Digital to Analog Converter (DAC) • General Purpose Input/Output (GPIO) There are 56 General Purpose Input/Output (GPIO) pins, which are divided into ports with up to 16 pins each. These pins can individually be configured as either an output or input. • Energy Modes • There are five different Energy Modes (EM0-EM4) in the EFM32G
System Summary • Peripheral Reflex System (PRS)The Peripheral Reflex System (PRS) system is a network which lets the different peripheral modulecommunicate directly with each other without involving the CPU.Timer/Counter (TIMER) 3× 16-bit Timer/Counter • EBI - External Bus Interface
Exceptions and interrupts • The exception types are: 1 to 30 interrupts. • Reset • NMI In the EFM32G devices a NonMaskable Interrupt (NMI) can only be triggered by software. This is the highest priority exception other than • Hard fault A hard fault is an exception that occurs because of an error during exception processing,, • Bus fault A bus fault is an exception that occurs because of a memory related fault for an instruction or data memory transaction.
Exceptions and interrupts • SysTick A SysTick exception is an exception the system timer generates when it reaches zero
Programmers model • Processor modes The processor modes are: • Thread mode Used to execute application software. The processor enters Thread mode when it comes out of reset. • Handler mode:Used to handle exceptions.. Data types • The processor: supports the following data types • 32-bit words16-bit halfwords 8-bit bytes supports 64-bit data transfer instructions
Core registers General- purpose registers
Memory modelThe processor has a up to 4GB of addressablememory
Memory regions, types and attributes • The memory types are • Normal Executable region for data. • Device The processor preserves transaction order relative to other transactions to Device or Strongly-ordered memory. • Strongly-ordered The processor preserves transaction order relative to all other transactions. • Execute Never (XN) Means the processor prevents instruction accesses. Any attempt to fetch an instruction from an XN region causes a memory management fault exception
GPIO pinout overviewThe specific GPIO pins available in EFM32G840 is shown in Table 4.2 (p. 23) . Each GPIO port is organized as 16-bit ports indicated by letters A through F,
Instruction set • ADD, ADC, SUB, SBCAdd, Add with carry, Subtract, Subtract with carry • 3.5.1.1 Syntax • op{S}{cond} {Rd,} Rn, Operand2 • op{cond} {Rd,} Rn, #imm12 ; ADD and SUB only • where: • S is an optional suffix. If S is specified, the condition code flags are updated on the result of • the operation,. • cond is an optional condition code,. • Rd is the destination register. If Rd is omitted, the destination register is Rn. • imm12 is any value in the range 0-4095.
Examples • ADD R2, R1, R3 • SUBS R8, R6, #240 ; Sets the flags on the result • RSB R4, R4, #1280 ; Subtracts • 96-bit subtraction • SUBS R6, R6, R9 ; subtract the least significant words • SBCS R9, R2, R1 ; subtract the middle words with carry • SBC R2, R8, R11 ; subtract the most significant words with carry
AND, ORR, EOR, BIC, and ORNLogical AND, OR, Exclusive OR, Bit Clear(logical AND NOT), and OR NOT. • Syntax • op{S}{cond} {Rd,} Rn, Operand2 • Examples • AND R9, R2, #0xFF00 • EORS R7, R11, #0x18181818 • BIC R0, R1, #0xab • ORN R7, R11, R14
ASR, LSL, LSR, RORArithmetic Shift Right, Logical Shift Left, Logical Shift Right, Rotate Right • Syntax • op{S}{cond} Rd, Rm, Rs • op{S}{cond} Rd, Rm, #n • Examples • ASR R7, R8, #9 ; Arithmetic shift right by 9 bits • LSLS R1, R2, #3 ; Logical shift left by 3 bits with flag update • LSR R4, R5, #6 ; Logical shift right by 6 bits • ROR R4, R5, R6 ; Rotate right by the value in the bottom byte of R6
CLZCount Leading Zeros. • Syntax • CLZ{cond} Rd, Rm • Examples • CLZ R4,R9 • ADR • Syntax • ADR{cond} Rd, label • Load PC-relative address • Examples • ADR R1, TextMessage
LDR and STR • Examples • LDR R8, [R10] ; Loads R8 from the address in R10. • STR R2, [R9]
MOV and MVNMove and Move NOT. • SyntaxMOV{S}{cond} Rd, Operand2MOV{cond} Rd, #imm16MVN{S}{cond} Rd, Operand2 • Example • MOVS R11, #0x000B ; • MOV R1, #0xFA05 ; • MOVS R10, R12 ; Write value in R12 to R10, flags get updated • MVNS R2, #0xF ; • Write value of 0xFFFFFFF0 (bitwise inverse
RAM---256Byte ROM-----8Kbytes EEPROM---512Bytes CLOCK 2MHZ PINS 52-pin 16-bit Extenal interface of memory Address able space 64k 16k B 128 KB 32kb 32-bit 1gb 4GB Price 10$ HC11 VS EFM32G840F128