Interupt suspention

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Post Reply
User avatar
Bear in There
Posts: 31
Joined: Tue Nov 20, 2018 9:30 pm

Interupt suspention

Post by Bear in There » Tue Nov 20, 2018 10:41 pm

I was trying to port some code that included - cli() sei()
I made it work by ignoring the situation but in all the research I did I could not find a STM32 generic answer.

I found some answers for Maple

Correct me if Im wrong, maybe @72M the suspention of interrupts is not as critical, but none the less it should be available

Plz excuse my ignorance I'm new here and as such not fully up to date with the work being done by those with a passion.
Good artists copy; great artists steal. (Incorrectly accredited to Pablo Picaso by Steve Jobs)

stevestrong
Posts: 3053
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: Interupt suspention

Post by stevestrong » Tue Nov 20, 2018 10:54 pm

If you use Roger's libmaple core, then

Code: Select all

noInterrupts();
interrupts();
can be used.
Also see: http://stm32duinoforum.com/forum/viewtopic.ph ... 67&p=14555

User avatar
mrburnette
Posts: 3001
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Interupt suspention

Post by mrburnette » Tue Nov 20, 2018 10:55 pm

Read more here: http://stm32duinoforum.com/forum/viewtopic.php?t=3435

And remember ... do not double-post!


Ray

dannyf
Posts: 330
Joined: Wed May 11, 2016 4:29 pm

Re: Interupt suspention

Post by dannyf » Wed Nov 21, 2018 12:30 am

I often don't implement Interrupts() / noInterrupts(). whether you need them implemented will depend on your code. many times it is not critical to have them implemented, other times it is.

on some chips, there is no way to permanently disable the interrupts - i personally it is much better to write code assuming that the interrupt is always enabled.

not sure if Interrupts() / noInterrupts() are actually implemented here, however.

stevestrong
Posts: 3053
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: Interupt suspention

Post by stevestrong » Wed Nov 21, 2018 10:45 am


User avatar
Bear in There
Posts: 31
Joined: Tue Nov 20, 2018 9:30 pm

Re: Interupt suspention

Post by Bear in There » Sat Dec 01, 2018 1:14 pm

Sorry gentlemen I have been otherwise pre occupied for the last week,

But I do appreciate your feed back.

dannyf - it's all about the complexity of your code.
mrburnette - If I double posted it's only because I'm 52 and struggling to figure tweetz
stevestrong - true, but in my environment it didn't work.

In the end I am playing with STMF2F103C8 and @72Mhz and I found cleaner methods, that's not to say that in more complex situations Interrupt suspension would be needed, but not yet.

So thanks for your feedback.
Good artists copy; great artists steal. (Incorrectly accredited to Pablo Picaso by Steve Jobs)

User avatar
mrburnette
Posts: 3001
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Interupt suspention

Post by mrburnette » Sun Dec 02, 2018 12:59 am

just to complete the On/Off interrupts\ discussion, there are two core functions... depends on core used:

http://stm32duinoforum.com/forum/viewtopic.php?t=2101#p28226

Post Reply