-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Interruptable ISR #28
Comments
Hi Sebastian,
On which platform did you run this code? I'm not sure if it runs on all. I propose to add your code in the documentation, indicating the precautions of use.
Kind Regards,
Pierre
… Le 31 mai 2021 à 15:07, wangnick ***@***.***> a écrit :
Hi Pierre,
I found that I can allow the ISR to be interruptable, thereby lowering the latency of other interrupts significantly, as follows:
static void can_isr () { // We don't want to block interrupts whilst performing low-level CAN processing ...
detachInterrupt(digitalPinToInterrupt(CAN_INT)) ;
interrupts();
can.isr();
noInterrupts();
attachInterrupt(digitalPinToInterrupt(CAN_INT),can_isr,LOW);
}
However, that's a bit of a hassle, including the attachInterrupt after ACAN2515::begin and the detachInterrupt prior to ACAN2515::end.
Can you add ISR interuptability as an option?
Kind regards,
Sebastian
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#28>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVCCIS6JAGOS4PDJK3DTQOC2DANCNFSM4523RVDQ>.
|
Hi Pierre, this is on an Atmega328PB, but I guess it should work on all AVR 8-bit platforms. I guess you are concerned about the ESP32? Kind regards, |
Hi Sebastian,
Ok, it is a 8-bit microcontroller.
Yes about ESP32, and also for all Cortex-M based microcontrollers. A Cortex-M implements a Nested Vectored Interrupt Controller that allows interrupts to be nested, but we have to set interrupt priorities carefully.
I need somme times to make some experimentations with a Teensy 3.5, a bord with a Cortex-M4 microcontroller.
Kind Regards,
Pierre
… Le 4 juin 2021 à 16:17, wangnick ***@***.***> a écrit :
Hi Pierre, this is on an Atmega328PB, but I guess it should work on all AVR 8-bit platforms. I guess you are concerned about the ESP32?
Kind regards,
Sebastian
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#28 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVDEJPOFQTROCFJJ2YLTRDN6HANCNFSM4523RVDQ>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Pierre,
I found that I can allow the ISR to be interruptable, thereby lowering the latency of other interrupts significantly, as follows:
However, that's a bit of a hassle, including the
attachInterrupt
afterACAN2515::begin
and thedetachInterrupt
prior toACAN2515::end
.Can you add ISR interuptability as an option?
Kind regards,
Sebastian
The text was updated successfully, but these errors were encountered: