Search found 20 matches

by OSCPUDEV
Tue Aug 27, 2024 2:56 am
Forum: ESP32 Arduino
Topic: Best Frequency Meter ever made with ESP32 - awesome!
Replies: 96
Views: 130705

Re: Best Frequency Meter ever made with ESP32 - awesome!

Have you considered using the Capture Submodule of MCPWM module instead of the PCNT module? You can set the resolution down to 12.5ns (80MHz). There are 3 channels available, and they are fully hardware driven. An edge change on a GPIO causes the module to grab the current 32 bit timer value and sto...
by OSCPUDEV
Thu Aug 22, 2024 7:44 pm
Forum: ESP32 Arduino
Topic: High level interrupt (5) and NMI issues
Replies: 11
Views: 2186

Re: High level interrupt (5) and NMI issues

Just a follow-up! The problem with not being able to use NMI is apparently a known bug in the ESP-IDF! This has been reported: https://github.com/espressif/esp-idf/issues/13629 There is a working around, but is only for v5.2.1 of the ESP-IDF core, not the version that the Arduino core is using: http...
by OSCPUDEV
Wed Aug 21, 2024 4:37 pm
Forum: ESP32 Arduino
Topic: High level interrupt (5) and NMI issues
Replies: 11
Views: 2186

Re: High level interrupt (5) and NMI issues

OK, so who handles the Arduino ESP stuff? I looked at xtensa_vectors.S code and see how the interrupt handler works... and I can see why it takes 220ns before the high level interrupt routine is called. Can you tell me how I can determine WHERE (memory address) the interrupt table is located? It see...
by OSCPUDEV
Wed Aug 21, 2024 6:16 am
Forum: ESP32 Arduino
Topic: High level interrupt (5) and NMI issues
Replies: 11
Views: 2186

Re: High level interrupt (5) and NMI issues

I tried a variety of things to invoke the override. "External" is not valid (Extern is). Also, this is not valid under Arduino IDE (compiler errors): p=&ld_include_xt_nmi; I tried even making a subroutine calls like: call ld_include_xt_nmi(), call _xt_nmi(), etc. and that didn't change anything. Do ...
by OSCPUDEV
Tue Aug 20, 2024 12:03 pm
Forum: ESP32 Arduino
Topic: High level interrupt (5) and NMI issues
Replies: 11
Views: 2186

Re: High level interrupt (5) and NMI issues

Do you actually refer to 'ld_include_xt_nmi' in your CMakelists.txt? (cflags needs a '-u ld_include_xt_nmi' to force the linker to evaluate your asm file) I am using the Arduino IDE. I don't do anything with make files, just click the compile button. The exact same code, using .global ld_include_xt...
by OSCPUDEV
Mon Aug 19, 2024 8:52 pm
Forum: ESP32 Arduino
Topic: High level interrupt (5) and NMI issues
Replies: 11
Views: 2186

Re: High level interrupt (5) and NMI issues

I also have a question about changing interrupt handlers. How can I have 5 different _xt_nmi routines and choose which one is used? I do NOT want to have to test inside of the interrupt and branch/jump to the appropriate code.. that would require >25ns, which is way too long. There must be a way to ...
by OSCPUDEV
Mon Aug 19, 2024 7:48 pm
Forum: ESP32 Arduino
Topic: High level interrupt (5) and NMI issues
Replies: 11
Views: 2186

Re: High level interrupt (5) and NMI issues

Well, after looking over my code to try to get the NMI version to work I see that I made a big mistake in the interrupt setup (C++ code). I had the INTR_NUM at 14 correct, but I had the flags wrong. The esp_intr_alloc() flags should be ESP_INTR_FLAG_NMI (not ESP_INTR_FLAG_LEVEL5). Now, the ESP32 doe...
by OSCPUDEV
Mon Aug 19, 2024 10:34 am
Forum: ESP32 Arduino
Topic: High level interrupt (5) and NMI issues
Replies: 11
Views: 2186

Re: High level interrupt (5) and NMI issues

You were spot on about why the interrupt could be firing twice in a row! I swapped the code around so that the interrupt flag is cleared immediately following saving the registers. That does in fact solve the problem with the interrupt firing twice! Why is this the case though? I would expect that s...
by OSCPUDEV
Mon Aug 19, 2024 1:42 am
Forum: ESP32 Arduino
Topic: High level interrupt (5) and NMI issues
Replies: 11
Views: 2186

High level interrupt (5) and NMI issues

[SOLVED] PROBLEM #1 - interrupt firing twice Hardware configuration: ESP32-S2 and ESP32-S3 Dev Modules - (both do the same thing) I created a very basic high level interrupt test for a GPIO input, with the required assembly code (.S) handler. This works fine, but there is an issue that was also rep...
by OSCPUDEV
Tue Jul 25, 2023 10:22 pm
Forum: ESP32 Arduino
Topic: Can all pins be used when using WiFi?
Replies: 12
Views: 29532

Re: Can all pins be used when using WiFi?

@lesept, have you confirmed that you have the proper size pull-up resistors on SCL and SDA? This is not optional. You only need one set of resistors (2.2K to 10K, with 4.7K being nominal) per I2C channel.