AnsweredAssumed Answered

Enable/Disable interrupts with ST firmware library

Question asked by carter.bob on Oct 19, 2015
Latest reply on Oct 20, 2015 by Clive One
Hi Forum,

I am seeing some spurious results when running code and I think it may be interrupt related. To test, I need a quick way of enabling/disabling .

There are two types of interrupts running on our system, external (EXTI) and internal timer interrupts. Will the following to the trick to enable and disable all interrupts or just the external ones.

Enable...
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
     
NVIC_Init(&NVIC_InitStructure);

Disable..
NVIC_InitStructure.NVIC_IRQChannelCmd = DISABLE;

NVIC_Init(&NVIC_InitStructure);

If only external interrupts, how could one disable all?

Thank you.
Bob Carter


 

Outcomes