#18 interrupts Part-3: How interrupts work on ARM Cortex-M?

preview_player
Показать описание
This lesson finally explains how ARM Cortex-M handles interrupts and why interrupt handlers can be regular C functions on this CPU. Specifically, you will see how the designers of the chip have solved the problem by saving all the right CPU registers and returning from interrupt functions.

------
Resources:

Companion web page for this video course:

GitHub repository for projects for this video course:

Transcript of this lesson:

Music credits:
The background music comes from:
Рекомендации по теме
Комментарии
Автор

I took two embedded systems classes in college and wasted $50k without getting this level of instruction. Thank you for this course

alexcipriani
Автор

For those working in Keil microVision: I found the NVIC registers in the menu Peripherals->Core Peripherals.

jorgis
Автор

One important statement from the datasheet "When the processor is halted for debugging, the counter does not decrement" - this explains why Miro's use of the PENDSTSET bit in the debugger is what causes the interrupt and not the wrapping of SysTick while the user is getting things setup manually in the debugger. Just figured that I would add this comment in case anyone had any doubts.

keithevans
Автор

Hello Mr.Samek, I was watching these tutorials long time ago and thought you have abandoned the tutorial series... but now I see lots of new videos added! Thank you for the wonderful effort!

Chataou
Автор

Watched several times and learned new stuff every time. Amazing! Can not wait your second lesson on RTOS!

mengnan
Автор

I cannot thank you enough for this truly incredible tutorial.

loverboyhk
Автор

at 4:19 you said we are stopped at the MOVS instruction but actually we are stopped at LDR instruction
thank you for the Nice course Sir

salmantechnologies
Автор

Yet again, the best explanation i've found yet. Thanks!

mfjoyce
Автор

Amazing job Dr.Samek and please keep it up.
Many thanks indeed.

Sayf
Автор

Sir Miro thanks for your lessons, i had watched 11 lessons till now and i thought it's a complete course.
Im having a little problem where im having an interview and i must get to the rest of the issues in embedded C, So i wish you can tell me the rest of topics so that i get through them in any other sites.

Thanks ...

siefeldinyones
Автор

Been waiting for very long..Thanx already. :)

ankitfparmar
Автор

Excellent video ! A question about the file structure : Given the Systick is present in every single implementation of ARMV7-M architecture, why would the systick handler be part of a board support package file?

anthonyrocha
Автор

Hello Miro,

first of all, this is the best video tutorial about programming I have ever seen!
My question: Is the the 12-cylcles long instructuion for entering the ISR somewhere in FLASH? Where? Thank you!

pavelpalivec
Автор

Greetings team QP,

I first thank for this great playlist and for your significant efforts. I have followings doubts on the interrupts kindly help to clarify them, thanks in advance.

1. The stack frame without using FPU is of 8-bytes long and the aligner is needed to align the memory address in stack based on 8-bytes frame block, As you stated an example of stack misalignment 3F4 is not divisible by 8 so there was an aligner word for 1 byte is added to compensate. Similarly when using with FPU, the stack frame size is 26-Bytes initially which is not divisible by 8, How will the block get divided with 26 Bytes?

2. I have understood the need for aligner word, its function is just similar to the padding bits which is added in between the structure data's to align memory in even address to access it easily, Similarly in the stack frame the aligner word does this based on AAPCS guideline, Is my understanding correct?

mahalinga
Автор

HI MMS - @time 4.19, don;t you think that the interrupt will fire after executing LDR.N instruction in the main loop and not after MOVS as interrupt line will be checked after executing LDR.N instruction. Let me know, if I missing something. Thanks a lot. Listening to your video again, I guess the interrupt line goes high moment NVIC bit is set manually. It is just that interrupt line should have drawn going high while executing MOVS instruction.

jankeshchakravarthy
Автор

please make videos on multi-core processor software design

ameyaphadke
Автор

Going one step further than switching LEDs using interrupts using this startup-code/vector table: Is there an accepted way of passing arguments (structs) to the interrupt function?
For example, if you want to hand over a struct which is defined in main.c to an I2C processing interrupt function?

Function in bsp.c
void ExampleI2CIntHandler(void)
{
I2CMIntHandler(&g_sI2CInst);
}

lukaspfeiffer
Автор

every time i run the code it doesn't go into the interrupt

SuperBebostar
Автор

Samek, Do you have any videos about unions, and using structures as members of union. it actually gets very confusing where there are many nested structures and pointers to structures (! not in your videos though !) for my application for writing drivers ( using the Registers )

saiganesh
Автор

hi Mr.Samek. I think you said about "How interrupts work on ARM Cortex-M" related to NVIC. Why you don't talk about NVIC ??. I'm so sorry becauce my English so bad :<<

thucngoxuan