考试速记

知识点速记

  1. CAN bus is a vehicle bus standard designed to allow microcontrollers and device to communicate with each other within a vehicle without a host computer.
  • CAN: Control Area Network
  1. Volatile Keyword
  • Indicate to the complier that the variable may change its value

  • Must be written from RAM instead of CPU register

  • If not used, there might be Bugs/ Unstable Conditions

  1. Almost every processor has a number of privileged instructions for Operating System(OS) fucntions

  2. Critical Sections

  • Code Segments share the **same resources(Memory, I/O ports).

  • So they must be executed atomically ( 作为整体执行,不受interruption 或 interve 等任何因素的干扰)

  1. Fixed-Point Expression & Floating-Point Expression
  • Difference: How they handle decimal numbers

  • In a fixed-point number representation, a fixed number of bits is allocated for the integer part and the fractional part of the number. This means that the range and precision of numbers that can be represented are limited. For example, if we allocate 8 bits for the integer part and 8 bits for the fractional part, we can represent numbers from -128 to 127 with a resolution of 1/256.

  • a floating-point number representation allows for more flexibility in representing decimal numbers. It uses a combination of sign, exponent, and mantissa to represent numbers in scientific notation. This allows for both large and small values to be represented accurately with varying levels of precision.

  1. Von Neumann & Harvard Architecture
  • V: CPU performs both data processing and instruction fetching from the same memory unit. The instructions and data are stored in the same memory spac

  • H: Harvard Architecture separates the instruction memory and data memory into two separate units with dedicated buses.

  1. bit-bands
  • each byte of memory is divided into 8-bit segments called bit-bands
  1. Embedded Firmware
  • The control algorithm (Program instructions) and or the configuration settings that an embedded system developer dumps into the code (Program) memory of the embedded system.

Polling and Interrupt

Polling (轮询)

  • Polling is the protocol that indicates the CPU that a device requires its attention. It is a continuous act to figure out whether the device is working properly.

Interrupt

  1. An interrupt is the automatic transfer of software execution in response to a hardware event that is asynchronous with the current software execution.

  2. When the interrupt program is finished, which line should the main program return to?

  • The line that the interrupt occurred, i.e., current instruction;

  • The next line that the interrupt occurred, i.e., next instruction;

  • Abort (there is an error)

  1. Interrupt 和 Polling
比较 Interrupt Polling
Servcing ISR(Interrupt Servcing Ruotine), immediately stop monitoring devices
Mechanism Organized Mechanism Protocol
Advantage More flexible, efficient Simple
Disadvantages More Complex Hardware Unnecessary time
  1. Interrupt Handlers Designs

小的知识点

L432KC 的结构,内存

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy