Software Interrupt Setup for MIMXRT1064

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Software Interrupt Setup for MIMXRT1064

Jump to solution
1,745 Views
JennyC
Contributor I

Hi

I am working with MIMXRT1064 with  MCUXpresso and SDK_2_16.

I want to implement a simple software interrupt so I can initiate an ISR using a software command. Other microprocessors I have used have dedicated interrupt vectors for this purpose, but I could not find an IRQ_NUMBER_t in the i.MX RT1064 Processor Reference Manual or the MIMXRT1064.h

Can I have suggestions on how to accomplish this? Any example?

Regards,

Jenny

0 Kudos
Reply
1 Solution
1,724 Views
mayliu1
NXP Employee
NXP Employee

Hi @JennyC ,

Thank you for your interest in the NXP MIMXRT product, I would  like to provide service for you.

On the NXP i.MX RT1064 microcontroller (or any other ARM Cortex-M based MCU), you cannot directly start an Interrupt Service Routine (ISR) through a "software command" because ISRs are triggered by hardware interrupts.

In the ARM Cortex-M architecture, the NVIC (Nested Vectored Interrupt Controller) is responsible for handling the priorities, enabling, and pending states of interrupts and exceptions. However, directly triggering interrupts by writing to NVIC registers through software is generally not a standard practice, as doing so may bypass the normal interrupt triggering mechanism, potentially introducing debugging difficulties or security risks.

https://www.nxp.com/webapp/Download?colCode=IMXRT1064RM

The table below describes the Cortex-M7 interrupt sources:

mayliu1_0-1726049648207.png

 

However, you can indirectly trigger an ISR by programming a hardware event that subsequently generates an interrupt.

For example, you can using timer interrupts, it is the simplest and most reliable method to achieve software-triggered ISR behavior. You can configure the timer's parameters as needed to trigger the interrupt at specific times or conditions.

Wish it helps you.
If you still have question about it, please kindly let me know.

Best Regards

mayliu

 

 

View solution in original post

0 Kudos
Reply
2 Replies
1,725 Views
mayliu1
NXP Employee
NXP Employee

Hi @JennyC ,

Thank you for your interest in the NXP MIMXRT product, I would  like to provide service for you.

On the NXP i.MX RT1064 microcontroller (or any other ARM Cortex-M based MCU), you cannot directly start an Interrupt Service Routine (ISR) through a "software command" because ISRs are triggered by hardware interrupts.

In the ARM Cortex-M architecture, the NVIC (Nested Vectored Interrupt Controller) is responsible for handling the priorities, enabling, and pending states of interrupts and exceptions. However, directly triggering interrupts by writing to NVIC registers through software is generally not a standard practice, as doing so may bypass the normal interrupt triggering mechanism, potentially introducing debugging difficulties or security risks.

https://www.nxp.com/webapp/Download?colCode=IMXRT1064RM

The table below describes the Cortex-M7 interrupt sources:

mayliu1_0-1726049648207.png

 

However, you can indirectly trigger an ISR by programming a hardware event that subsequently generates an interrupt.

For example, you can using timer interrupts, it is the simplest and most reliable method to achieve software-triggered ISR behavior. You can configure the timer's parameters as needed to trigger the interrupt at specific times or conditions.

Wish it helps you.
If you still have question about it, please kindly let me know.

Best Regards

mayliu

 

 

0 Kudos
Reply
1,707 Views
JennyC
Contributor I

Hi mayliu,

Thanks for the quick response. This solved my problem.

Regards,

Jenny 

 

 

0 Kudos
Reply