MIMXRT1050 __disable_irq() Not Working

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

MIMXRT1050 __disable_irq() Not Working

1,182 Views
kamal1
Contributor III

Hello,

I am working on a project using the MIMXRT1050 board with Kielv5 Pro Edition. I am using Keil RTOS2 and when I try to use the __disable_irq() function, nothing happens. I have went into debug mode and checked the disassembly file and it does show that the __disable_irq() function is masking the CPSID to disable interrupts.

I am currently using the __disable_irq() function to test my watchdog timer interrupt, in which the board will reset if the wdog is not refreshed. The wdog is set up to reset the board after 10 seconds of no refresh which means if I call the __disable_irq() function, after 10 seconds the board will reset.

 

I think that the __disable_irq() function is working correctly but maybe something is causing the interrupts to be re-enabled right away, or maybe the __disable_irq() function is just not working.

Does anyone know why the __disable_irq() function is not working correctly?

Here are some pictures of my code if it helps:

pastedImage_3.png

pastedImage_4.png

pastedImage_5.png

Regards,

Kamal

Labels (1)
0 Kudos
2 Replies

1,025 Views
brucemckenney
Contributor III

After you do the disable, your program continues. I wouldn't be surprised if milisec() or TestButton() re-enables. 

Try following the disable with something like "while(1)/*EMPTY*/; // Spin until we reset".

0 Kudos

1,025 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Kamal Nasif ,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
It seems a bit weird.
Whether you had tried to do the same testing on the wdog01 project in the SDK library. If not, please give a try.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos