Apache NuttX is a mature, real-time embedded operating system (RTOS) https://nuttx.apache.org/
Find a file
Jukka Laitinen 429252152a arch/arm64/src/common/arm64_arch_timer.c: Remove clock drift from tick timer
This fixes two issues with the tick timer
1) Each tick was longer than the requested period. This is because setting
   the compare register was done by first reading the current time, and only
   after that setting the compare register. In addition, when handling the
   timer interrupts in arch_alarm.c / oneshot_callback, the current_tick is
   first read, all the tick handling is done and only after that the next tick
   is started. The whole tick processing time was added to the total tick time.

2) When the compare time is not aligned with tick period, and is drifting,
   eventually any call to ONESHOT_TICK_CURRENT would either return the current
   tick, or the next one, depending on the rounding of division by the
   cycle_per_tick. This again leads to oneshot_callback randomly handling
   two ticks at a time, which breaks all wdog based timers, causing them to
   randomly timeout too early.

The issues are fixed as follows:

Align the compare time register to be evenly divisible by cycle_per_tick.
This will lead arm64_tick_current always to return the currently ongoing tick,
fixing 2). Also calculating the next tick's start from the aligned current
count will fix 1), as there is no time drift in the start cycle.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-30 19:23:01 +08:00
.github build(deps): bump codelytv/pr-size-labeler from 1.10.0 to 1.10.1 2024-09-23 14:37:02 +08:00
arch arch/arm64/src/common/arm64_arch_timer.c: Remove clock drift from tick timer 2024-09-30 19:23:01 +08:00
audio audio: add AUDIO_MSG_IOERR msg to meida service 2024-09-30 08:43:22 +08:00
binfmt modlib/dlfcn:unify same code 2024-09-29 15:06:54 +08:00
boards arch/x86_64: Reimplement the NuttX32 multiboot1 wrapper. 2024-09-30 15:35:41 +08:00
cmake cmake:refactor CMake add_romfs module to support ABS path 2024-09-27 09:55:50 +08:00
crypto nuttx/crypto: export asynchronous calling process 2024-09-28 13:05:28 +08:00
Documentation fdt: add fdt description document 2024-09-30 14:20:49 +08:00
drivers drivers/timers/arch_alarm.c: Clean-up oneshot_callback for non-tickless build 2024-09-30 19:23:01 +08:00
dummy build: add initial cmake build system 2023-07-08 13:50:48 +08:00
fs fs/ioctl:add FIOC_XIPBASE to get file xip address 2024-09-30 18:25:46 +08:00
graphics Revert "build depend:Revert Make.dep intermediate ddc file" 2024-09-15 19:29:47 +08:00
include assert: cleanup assert handler 2024-09-30 18:43:35 +08:00
libs nuttx/libm: switch from integer to double constants in pow 2024-09-30 08:32:46 +08:00
mm mm/kasan: Kasan global support setting alignment length 2024-09-20 21:47:23 +08:00
net accept4:move function from net to fs 2024-09-30 16:30:56 +08:00
openamp Revert "build depend:Revert Make.dep intermediate ddc file" 2024-09-15 19:29:47 +08:00
pass1 Revert "build depend:Revert Make.dep intermediate ddc file" 2024-09-15 19:29:47 +08:00
sched assert: dump all CPU registers and stack 2024-09-30 18:43:35 +08:00
syscall fs/mmap/msync:support msync. 2024-09-19 01:43:50 +08:00
tools tools/btdecode.sh: add optional elf file parameter 2024-09-30 08:44:18 +08:00
video Revert "build depend:Revert Make.dep intermediate ddc file" 2024-09-15 19:29:47 +08:00
wireless Revert "build depend:Revert Make.dep intermediate ddc file" 2024-09-15 19:29:47 +08:00
.asf.yaml feat: add a GitHub action to lint the YAML files 2020-12-15 09:52:04 -06:00
.gitignore add .gdb_history to .gitignore 2024-09-14 12:14:12 +08:00
.pre-commit-config.yaml Created pre-commit config file 2024-08-19 21:40:56 +02:00
.yamllint feat: add a GitHub action to lint the YAML files 2020-12-15 09:52:04 -06:00
AUTHORS AUTHORS: add Tomek CEDRO to the list 2023-03-07 14:15:55 +01:00
CMakeLists.txt CMake/preprocess: fix typo PREPROCES -> PREPROCESS 2024-09-25 11:55:06 +08:00
CONTRIBUTING.md Remove the tail spaces from all files except Documentation 2023-02-26 13:24:24 -08:00
INVIOLABLES.md
Kconfig compile: add DEBUG_SYMBOLS_LEVEL allow custom the level 2024-09-27 00:13:07 +08:00
LICENSE drivers/i3c: support i3c driver model 2024-09-24 23:36:50 +08:00
Makefile tools: migrate to SPDX identifier 2024-09-10 23:11:11 +08:00
NOTICE Remove the double blank line from source files 2022-02-20 20:10:14 +01:00
README.md Gathering community recommendations 2023-10-28 13:55:56 +08:00
ReleaseNotes Documentation: move ReleaseNotes 2023-09-26 20:41:00 +08:00

POSIX Badge License Issues Tracking Badge Contributors GitHub Build Badge Documentation Badge

Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).

For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.

Getting Started

First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.

Documentation

You can find the current NuttX documentation on the Documentation Page.

Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.

The old NuttX documentation is still available in the Apache wiki.

Supported Boards

NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.

Contributing

If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.

License

The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.