I have posted code on this forum to allow the calculation of frequency from a square wave on a digital input . Works absolutely fine. I have also code to sample an analog based on a timer interrupt. This also works fine, giving me 750 samples for each analog, and sequencing between 4 analogs (I'm working on the 5 to 20 HZ here so quite slow)
When I combine these two programs the analog sampling works fine but the frequency does not seem to work. Output remains about 3300 HZ.
I must admit I am a little lost with the port Entry/Exit calls and have used different ones for each interrupt. if I use the same for both there isI still have the problem. Can any one shed a light on where I am going wrong
The zip file includes both programs
Timer Interrupt problem Digital and Analog sampling
Timer Interrupt problem Digital and Analog sampling
- Attachments
-
- ESP32_Two_Interrupts.zip
- (3.63 KiB) Downloaded 364 times
Who is online
Users browsing this forum: No registered users and 50 guests