when an interrupt kicks in, th current context (core registers , pc and so on are saved). Where in a cube generated project, would I find the context save and restore part? Which registers need to be saved? How many cycles does it need?
The core saves the registers it needs and this matches the ABI for calling C functions, so not special handling is required to use C functions as interrupt handlers. The value of LR passed to the function, is a magic value which upon return tells the core to recover the original context.
Nominally PC, XPSR, R0, R1, R2, R3, R12 and LR
The core does this, review documentation for the Cortex-Mx part in question. Either the ARM TRM or books by Joseph Yiu
A Beginner’s Guide on Interrupt Latency - and Interrupt Latency of the ARM Cortex-M processors - Processors blog - Proce…
Retrieving data ...