Skip to content

The timer with external interrupt issue..... #283

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

Closed
Jason0416 opened this issue Jul 24, 2018 · 7 comments
Closed

The timer with external interrupt issue..... #283

Jason0416 opened this issue Jul 24, 2018 · 7 comments

Comments

@Jason0416
Copy link

When use the timer, The external interrupts not work.........

stimer_t timer1; // Timer1

void.....(){
timer1.handle.Instance = TIM1;
TimerPulseInit(&timer1, 417, 0, IsrTim1);
.
.
.
pinMode(PA1, INPUT);
attachInterrupt(PA1, rxPinChanged, CHANGE);
}

The timer interrupt working, But the external interrupts no work.

@fpistm
Copy link
Member

fpistm commented Jul 25, 2018

Hi, could you be more precise, please.
Which target? Full sketch,...

@fpistm fpistm added the waiting feedback Further information is required label Jul 26, 2018
@Jason0416
Copy link
Author

BluePill is the target. When change the pinMode to INPUT_PULLUP or INPUT_PULLDOWN, It's working........

@fpistm
Copy link
Member

fpistm commented Jul 26, 2018

And what is wired on PA1? and How?

@Jason0416
Copy link
Author

image

@fpistm
Copy link
Member

fpistm commented Jul 27, 2018

I guess in INPUT the voltage level is not proper (10k too high?) that's why the CHANGE level is not detect.
Using the INPUT_PULL* probably clean the level.

@Jason0416
Copy link
Author

I will test it and the results will be reported here. Thks.

@Jason0416
Copy link
Author

Yes! The resistor is to small.....

@fpistm fpistm removed the waiting feedback Further information is required label Aug 6, 2018
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