-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] hardware timers broken for ARM devices #14514
Comments
hi @raiden00pl, if (lower->ops->getstatus) /* Optional */
{
...
}
else
{
ret = -ENOSYS;
} caused the DEBUG_ASSERT in DEBUGASSERT(lower->ops->tick_getstatus); maybe we can keep compatible by return -ENOSYS, if getstatus and tick_getstatus method are both NULL, nsh> timer
Open /dev/timer0
ERROR: Failed to get timer status: 38 when use timer cmd in nsh. if you have more information before which commit the behavior is worked as expect, please letme know. |
please review if the #14619 can match your requirements. |
the last working commit is f221c9e (for H7 you have to remove |
I tried with stm32h7 and return directly in timer_status. dump_stack in up_schedule_sigaction can get backtrace of. up_schedule_sigaction arch/arm/src/armv7-m/arm_schedulesigaction.c:104 (discriminator 1)
nxsig_queue_action sched/signal/sig_dispatch.c:199
nxsig_tcbdispatch sched/signal/sig_dispatch.c:540
group_signal_handler sched/group/group_signal.c:155
group_foreachchild sched/group/group_foreachchild.c:78
group_signal sched/group/group_signal.c:228
nxsig_dispatch sched/signal/sig_dispatch.c:735
nxsig_notification sched/signal/sig_notification.c:147
timer_notifier drivers/timers/timer.c:127
stm32_timer_handler arch/arm/src/chip/stm32_tim_lowerhalf.c:272
irq_dispatch sched/irq/irq_dispatch.c:148
exception_direct arch/arm/src/armv7-m/arm_doirq.c:49 if it's urgent requirement, you can do const void * const _vectors[] locate_data(".vectors")
aligned_data(VECTAB_ALIGN) =
{
/* Initial stack */
IDLE_STACK,
/* Reset exception handler */
start,
/* Vectors 2 - n point directly at the generic handler */
#if 0
[2 ... NVIC_IRQ_PENDSV] = &exception_common,
[(NVIC_IRQ_PENDSV + 1) ... (15 + ARMV7M_PERIPHERAL_INTERRUPTS)]
= &exception_direct
#else
[2 ... ARMV7M_PERIPHERAL_INTERRUPTS] = &exception_common,
#endif
}; in arch/arm/src/armv7-m/arm_vectors.c and we shall talk about how to cover these kind of usage TCIOC_NOTIFICATION & SIGEV_SIGNAL . |
Description / Steps to reproduce the issue
Hardware timer example (
apps/example/timer
) is broken for some of ARM devices (probably for all ARM chips, but I can't check all of them).What I have verified and is broken: all Nordic chips and all STM32 chips.
Broken with this PR: #13606
Here crash with
nrf52840-dk/jumbo
:On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Arch Linux
NuttX Version
nuttx-12.7.0-RC1, master
Issue Architecture
[Arch: arm]
Issue Area
[Area: Drivers]
Verification
The text was updated successfully, but these errors were encountered: