-
Notifications
You must be signed in to change notification settings - Fork 4
Stream Buffers
Jorge Pérez edited this page Nov 11, 2024
·
11 revisions
Checkout Computerphile video as an intro.
- Interruptions are raised from hardware. So sometimes you'll see them listed as a peripheral
- Stop main code execution
- Are kinda like functions, but don't have arguments, nor return value
- Lower values mean highest priority (0 is the MOST important)
- The interrupt values for some peripherals are usually predefined by the manufacturer. Check the interrupt table, and the vector table.
- Each *_IRQHandler instance in startup_stm32f767xx.s is used to map the function name to an address in the interrupt vector table. On ARM Cortex-M0+, -M3, -M4, and -M7 devices, this vector table can be relocated by an offset at runtime. See Further reading for some links to more information on these concepts.
- Most (but not all) peripherals on STM32 hardware will automatically clear interrupt flags when certain registers are read. It is important to ensure the interrupt is no longer pending—otherwise, the interrupt will fire continuously and you will always be executing the associated ISR!
- All ISRs share the same system stack; each task has a dedicated stack
| Acrronym | Meaning | What it does |
|---|---|---|
| NVIC | Nested Vector Interrupt Controller | The special hardware that manages interrupts. Decides what the processor should do when triggered. |
| ISR | Interrupt Service Routine | The function called when the intrrupt triggers |
| IRQ | ||
| Handler | ||
| - | Vector table | List that defines pointers to every possible ISR. These are specified in the .s file in your project. |
Are bridnges to pass trams of data from an iterruption to a task FreeRTOS Steam Buffers
Check the Drivers and ISR file in the Hands on RTOS with microcontrollers
- Configure the pins using AFIO (Alternate Function GPIO)
- Enable the peripheral Clock (RCC. Reset and Clock Control registers).
- __UART4_CLK_ENABLE()
- Configure the interrupts in the nested vector interrupt controller (NVIC)
- Configure the DMA.
- Configure the peripheral with the necessary settings, baud rate, parity, flow control, and so on.
With ❤️ from 🇲🇽