This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How does cortex-M33, for example, know previous exception priority?

Hello

I want to know about exception priority.

In following situation

  • A has highest priority, described as priority A.
  • B has medium priority, described as priority B.
  • C has lowest priority, described as priority C.

when following sequence is occurred.

  1. CPU runs in thread mode
  2. Exception C occurs. The CPU enter the handler mode. And the execution priority is priority C.
  3. Exception B occurs. The execution priority is priority B.
  4. Exception A occurs. The execution priority is priority A.
  5. When ISR for Exception A reaches end of task so use EXC_RETURN to return exception.
  6. Now execution back to ISR for B and the execution priority might be priority B.

My Question is how does the Cortex-M33 know correct priority number(priority B in above sequence #6)

Regards,

Susumu

Parents
  • This is a combination of the context being saved on the "stack" and the LR containing the proper EXC_RETURN value so that the proper context gets restored.

    USP   and Thread Mode to start.

           Execption C, context saved on USP and LR set proper to restore from there and Thread Mode -   on EXC_RETURN will return to USP and Thread Mode

    MSP and Handler Mode

           Exception B, context saved on MSP and LR set proper to restore from there and Handler Mode + Priority C  on EXC_RETURN will return to MSP Handler Priority C

    MSP and Handler Mode

            Exception A, context saved on MSP and LR set proper to restore from there and Handler Mode + Priority B On EXC_RETURN will return to MSP Handler Priority B

          

Reply
  • This is a combination of the context being saved on the "stack" and the LR containing the proper EXC_RETURN value so that the proper context gets restored.

    USP   and Thread Mode to start.

           Execption C, context saved on USP and LR set proper to restore from there and Thread Mode -   on EXC_RETURN will return to USP and Thread Mode

    MSP and Handler Mode

           Exception B, context saved on MSP and LR set proper to restore from there and Handler Mode + Priority C  on EXC_RETURN will return to MSP Handler Priority C

    MSP and Handler Mode

            Exception A, context saved on MSP and LR set proper to restore from there and Handler Mode + Priority B On EXC_RETURN will return to MSP Handler Priority B

          

Children