Other Parts Discussed in Thread: SYSBIOS
I have scoured the net about details regarding when HWI or SWIs can interrupt executing code; or how the CPU handles an IRQ. I have gone over the TI documentation about interrupts; but they simply talk about thread priorities - making it seem like an executing thread can be interrupted at any time. I would like to know if this is the case.
Running TI-RTOS, if the CPU receives a HWI while executing code - can the executing code be preempted anywhere (at/before any instruction)? Or are there certain instructions that can/cannot be interrupted?
For example, if the cpu is in the kernel of a pipelined for loop and the CPU receive a HWI can the for loop be halted mid-loop? Or are there certain instructions which can not be interrupted?
As a second related question - in the documentation for the DSPlib, it states that some functions disable interrupts for parts of their execution. Do you have any examples of types of code that would require interrupts to be disabled for their successful execution?
This question is for both the C674x and ARM cores on the OMAP-L138 processor running TI-RTOS. I am encountering random, rare crashes in a large embedded application and am investigating whether software preemption on these two cores could be the root cause of our issue; and as such am trying to get some more details on how the applications are actually preempted.