Skip to content
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

problem with Atmega162 #30

Open
digi55 opened this issue Feb 25, 2024 · 7 comments
Open

problem with Atmega162 #30

digi55 opened this issue Feb 25, 2024 · 7 comments

Comments

@digi55
Copy link

digi55 commented Feb 25, 2024

Hi,
Thank you for such a library.
I am using Arduino ide v2.3.2.
I detected a problem on Atmega162 in Major core 2.1.3 and above.
And also Including 3.0.1, this problem exists.
When I use Atmega162 with Pin31 (PE0 INT2) interrupt, the program is reset and restarts from the beginning.
This problem does not exist in Major Core 2.1.2.
Best Regards.

@MCUdude
Copy link
Owner

MCUdude commented Feb 25, 2024

Can you provide a bare minimum sketch so I can try to reproduce the issue?

@digi55
Copy link
Author

digi55 commented Feb 25, 2024

#define Led 3 // pin4
#define Motor_Sw 32 // pin31 INT2

void setup() {
pinMode(Led, OUTPUT);
digitalWrite(Led, LOW);

pinMode(Motor_Sw, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(Motor_Sw), ISR_MOTOR_SW, FALLING);
delay(300);

}

void loop() {

}

void ISR_MOTOR_SW(){
digitalWrite(Led, HIGH);
}

@MCUdude
Copy link
Owner

MCUdude commented Feb 25, 2024

Thanks! I'm not at my computer at the moment, but I'll look into it later. Thanks for reporting!

@MCUdude
Copy link
Owner

MCUdude commented Feb 25, 2024

BTW it's really weird that it works with 2.1.2, but not 2.1.3.

If you look at what changes were made in 2.1.3 compared to 2.1.2, none of them are related to the interrupt functionality...
v2.1.2...v2.1.3

@digi55
Copy link
Author

digi55 commented Feb 25, 2024

I think it is very interesting, There is no problem with 2.1.2. Everything is ok.
In all higher versions, including 3.0.1, the program is reset when int2 is triggered.

@digi55
Copy link
Author

digi55 commented Mar 2, 2024

Hi, have you had a chance to look at the problem?

@digi55
Copy link
Author

digi55 commented Jun 28, 2024

Hi, @MCUdude
The problem of Atmega162 resetting when INT2 is triggered, also continues in v3.02
I submit it for your information
best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants