[TriEmbed] TriEmbed Digest, Vol 58, Issue 8

Pete Soper pete at soper.us
Sun Mar 11 12:32:28 CDT 2018


On 03/11/2018 12:01 PM, Alex Davis via TriEmbed wrote:
>
>> Despite having detached the INT2 interrupt, are you still inside the
>> handler for that interrupt when you enter the code dependent on
>> millis()? If you're in an interrupt handler, millis() cannot work,
>> because it's dependent on an interrupt that you are holding off forever.
>> -Pete
>
> All I do in the handler is detach the interrupt.
This is the point in other forums where somebody would yell at you for 
not showing us enough of your code. :-)

I studied the detachInterrupt code for the 32U4 and it does just what 
one would expect: clears the enable register bit for the given interrupt 
number. You're sure you're giving it the correct interrupt number and 
not the pin number, right? If that was mixed up then every time you 
pushed the button you'd still be getting another interrupt. If it's a 
level interrupt vs edge triggered, then that would explain the hang 
until you released the button ('cause every time you left the handler 
the interrupt would occur again while the button was pressed).

-Pete


>
> Somehow my LIS3DH died so I have to order another before I can 
> continue troubleshooting.
>
> I also have a SEGGER J-Link EDU Mini on the way. I’ll get to the 
> bottom of this eventually.
>
>
> |\ |  (¯  \/ |¯\  |V| |\ ¯|¯ |¯) | \/ | | | |¯\ (¯   /¯  /\ |V|
> |-||_ (_  /\ |_/ @| | |-| |  | \ | /\ |^| | |_/ (_ . \_  \/ | |
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Triangle, NC Embedded Computing mailing list
>
> To post message: TriEmbed at triembed.org
> List info: http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org
> To unsubscribe, click link and send a blank message: mailto:unsubscribe-TriEmbed at bitser.net?subject=unsubscribe
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20180311/1bd404a1/attachment.htm>


More information about the TriEmbed mailing list