repeating timer stop fire when GPIO-IRQ is in use #1531
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk#1531
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi All,
I have a problem with my application using core 0 & 1, a repeat timer to poll sensors and two gpio-irq from
NRF24L01+ and ENS160 interrupt lines.
Timer callback and interrupt handler use multicore_fifo_push_blocking() to wakeup core1 to work and nothing is done in the IRQ context themself.
ENS160IRQ hammers every second and the NRF24IRQ after a Bluetooth transmission.
The repeating timer from default alarm pool, is set to 5 Seconds interval.
To serialize both interrupt & timer handlers, I added a mutex but this doesn't make any difference.
After a while the repeating timer stops firing. Interrupts are working without interruption.
Any Idea what cause this?
-Chris
Interesting workaround and a hint to hunt this bug down. I do not send anything from core1 back to
core0 in my implementation and therefore replaced the sleep_ms() in the main() with multicore_fifo_pop_blocking() and the repeating timer keeps working.
But not for that long, :( after 45min the timer sleep again.
Additional, I had the system running over night, and the timer comes and goes. That is very strange!
Hi,
digging around I read a comment in the header files for the multicore_fifo** implementation to be caution using this for your own implementation and use instead the "pico/util/queue.h" which is IRQ and thread save .
I changed my implementation now using queue_add_blocking() queue_remove_blocking().
So far my app becomes stable!
Chris
Glad you found the issue. I guess I can close this unless you think there is a bug in the sdk.
Peter, I had the application running over night and again the repeating timer go for sleep again.
Only Interrupt remains working. I already started a sample application triggered by external Arduino board for the IRQ while have a repeating timer running. Not able yet to trigger the bug. But I'm on it.
I wonder if it's another case of this https://github.com/raspberrypi/pico-sdk/issues/1552
can you try again with SDK 2.0.0 it should be fixed