I'm using an ARM Cortex-M4 MCU. If I have an interrupt handler for a GPIO at priority 2 and an SPI driver at priority 3 (i.e., lower priority than the GPIO's), and I call a (blocking) SPI read from within the GPIO's interrupt handler, will the SPI function work?
Related Questions in ARM
- Jiobook flashing
- How to flush denormal numbers to zero for apple silicon?
- How to exploit Unified Memory in OpenCL with CL_MEM_ALLOC_HOST_PTR flag?
- ARM Assembly code is not executing in Vitis IDE
- Which version of ARM does the M1 chip run on?
- Vector by Scalar Division with -ffast-math
- Why veneer code generated by gcc for cortex-m0 seems 8-byte aligned?
- Getting almost random time stamp counter on ARM
- Portenta H7 Baremetal Development and a Little Guidance on Embedded System Learning Roadmap
- STM32 RTC3 Mixed Mode: Writing TR resets SSR
- Implementing Quick Sort Algorithm in Visual2 with armv7
- How can I create an Inline assembly command with a multi-variable register offset?
- Inquiry: ARM Compatibility for Puppeteer
- Confusion with thumb instructions while compiling recipe for cortexm4 CPU
- Difficulty understanding virtual LPIs in GICv3
Related Questions in INTERRUPT
- the end of the I/O operation is notified to the system by an interrupt.how much system time do the mentioned operations occupy?
- Unable to set an interrupt affinity in linux?
- fastLED degrades PWM outputs Arduino
- Difficulty understanding virtual LPIs in GICv3
- IRQ interrupt obtaining abnormal possibilities
- MKL02Z32xxx4 (FRDM-KL02Z Board) Timer overflow interrupt not firing
- Interrupt handling with push buttons in ARMv7
- Ultrasonic range finder HC-SR04 using one timer
- Does the Direct Memory Access (DMA) interfere with the execution of user program execution?
- How to write the external interrupt callback function of Linux kernel v3.10?
- Interaction with a thread from ISR using C++ Standard Library on ESP32
- Global variable value doesn't change in ISR in C
- The module first installed the alarm when it started
- ATTiny1606 Timer TCA0 interrupt not triggering
- RT linux isr routine
Related Questions in CORTEX-M
- Why veneer code generated by gcc for cortex-m0 seems 8-byte aligned?
- STM32G030 refuses write to flash
- Unable to read value from gpio set as input
- Microcontroller hangs with LWIP UDP
- Can't connect ST-Link with APM32F003 through OpenOCD
- programming and debugging of different sam types
- VTOR not found in STM32F030
- Unit tests on registers with bare metal programming
- Force .bss section to be in last program header
- J-Link script to flash program in S32K144 (allow security)
- Cortex-M external interrupt occurs when executing fault handler with higher priority
- Why gcc is not using S16-S31 registers of Cortex M7?
- Issue with measuring ARM MCU interrupt latency
- What is the most efficient way to write two (for example) bits of a register using cortex-m0 instruction set?
- How to do unaligned int store on ARM Cortex M4?
Related Questions in IRQ
- STM32MP1 linux IRQs & EXTI controller config in DTS file
- How to trigger the Linux IRQ handler thread again when it finishes if there was same IRQ triggered while it was running
- /proc/interrupts not showing all irqs
- convert HW IRQ to Linux IRQ
- How to provide interrupt generating GPIOs from a kernel module
- Why are all irq disabled for retarget write on STM32?
- how to use interrupt function in Ubuntu 20?
- Can I increase a thread irq priority
- do I need to fill all the IDT exception entries, before handling IRQs?
- About the use of tasklet_hrtimer_init in hardware interrupt callback function
- How to know whether an IRQ was served immediately on ARM Cortex M0+ (or any other MCU)
- Crash when adding or removing data in code on an IRQ
- RPi Pico freezes on IRQ Interrupt call
- Linux kernel IRQ to execute long action
- GICv2 IRQ ID 1023
Related Questions in PRIORITY-INVERSION
- What is basic priority inheritance protocol and its working?
- After switching to Xcode 14 beta I got this error: QOS_CLASS_USER_INITIATED waiting on a lower QoS thread running at QOS_CLASS_DEFAULT
- Is there a way to implement inheritance priority mutex in win32?
- FreeRTOS mutex priority inheritance problem if changing priority of task
- Can this lead to an issue similar to priority inversion
- Does SCHED_IDLE actually preclude execution on non-idle core?
- Keil RTX priority inheritance with os_mut_wait and short timeout?
- Interruption of process in critical section
- About deadlock in Linux and Windows
- ARM Cortex-M4 Interrupt priorities
- Releasing multiple locks without causing priority inversion
- How does priority ceiling protocol works
- Can priority inversion occur in Android
- Does happen-before relationship impact priority inversion?
- POSIX mutex protocol - what exactly does this spec mean?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
The answer to your question depends on how it is blocking to handle the transfer, as @Notlikethat said.
If your SPI driver is a polling driver, then it will most likely work. In this case, your GPIO interrupt would spin on flags within the SPI peripheral, waiting for each part of the transfer to complete.
If your SPI driver is interrupt driven, then it will not work. Since you are executing a priority 2 interrupt (GPIO), the priority 3 interrupt (SPI) will not execute until the GPIO interrupt finishes. Depending on how your SPI driver is written, this may entirely hang your system, or it may result in a timeout.
If your SPI driver is DMA driven, then the answer is not so clear and depends on how the driver works. It is possible in this case, that your transaction would complete, but if the function has blocked waiting for a DMA interrupt, it may never arrive depending on its priority.
In any of the above cases, it would generally be considered not a good idea to do something like that inside of an interrupt. If you have an RTOS, you could use a high priority task that is waiting on a semaphore to execute the SPI transaction, or if the OS supports it, used deferred interrupt processing. If you aren't running with an RTOS, I would consider if there is a way you can signal a lower priority interrupt (i.e use PendSV at the lowest priority) or monitor a flag from within the main process. Using a lower priority interrupt, you can still preempt the main process (if that's what is needed), but all your other interrupts can continue executing. If you can monitor a flag in your main process, then that would also allow your interrupts to continue, but if you are time constrained, this may not be as possible (again, depending on how your application is structured)