Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4151

SDK • Re: RP2040 inter thread synchronisation

$
0
0
You are making me distrust my sanity as everything I suggest doesn't work for you!

I've just built a trivial test program:

https://github.com/arg08/pico_interrupt_demo

and while the FIFO version works fine, the Timer version does not.

What's happening is that irq_set_exclusive_handler(TIMER_IRQ_3) is crashing on core1; core1 is then no longer running and obviously doesn't handle any interrupts or anything else. Presumably this is because something else has already claimed that interrupt, but I haven't yet found out what.
Hi, thanks to your help and suggestions I now have this working on TIMER2.

However, I'd like to know what is using TIMER3. I'm measuring the length of some input pulses on GPIO lines by triggering on rising and falling edges and taking the difference of micros() in each event.

This is work fine but I'm getting about 20 irregular glitches per second , of either polarity ( at irregular times). I'm guessing that some higher prio ISR is delaying my ISR variously on rising or falling edges. It seems likely the culprit is this mysterious TIMER3 handler.

If I knew what it was, I may be able to eliminate it or mitigate this disruption.

#define PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM 3

I also find this in the rp2040 cmake files:
.arduino15/packages/rp2040/hardware/rp2040/3.7.2/ota/CMakeLists.txt:46: PICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1

What does this relate to ? How can I work out what is using TIMER3 ?

TIA.

Statistics: Posted by pie_face — Wed Sep 18, 2024 9:17 am



Viewing all articles
Browse latest Browse all 4151

Trending Articles