24076 Commits

Author SHA1 Message Date
Michal Lenc
58be428e37 arch/arm/src/samv7/Kconfig: allow 0 in MCANx_RXFIFOx_SIZE
Zero can be used to disable the FIFO queue. Fix the range to allow
to configure this value.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-12-04 16:32:39 +01:00
Mathias Duckeck
21b9b919cc arch/arm/samv7: allow all values for count in read
Some checks failed
Build Documentation / build-html (push) Has been cancelled
The parameter count of read had to be a multiple of 4, otherwise the
result was truncated. Now all values are possible.

Signed-off-by: Mathias Duckeck <mathias.duckeck@avat.de>
2025-12-03 22:05:53 +08:00
adriendesp
ec04ef9ccf arch/arm/xmc4 : various fixes and clean
- Fix EtherCAT signals drive strengh (from errata PORTS_CM.H002), caused bus faults.
- Changed xmc4_ecat.c for compile time pin definition.
- Fixed xmc4_ecat.c register not written (reset value already used).
- Removed EXTCLK for xmc4800 as pin is used for ECAT.
- Clean xmc4 familly board.h and clocks config.

Signed-off-by: adriendesp <adrien.desproges@gmail.com>
2025-12-03 13:47:34 +08:00
Filipe Cavalcanti
6ccc5847fb arch/risc-v/esp32c3: rename ESP32-C3 Generic configs
- ARCH_CHIP_ESP32C3_LEGACY created
- ARCH_CHIP_ESP32C3_GENERIC is now ARCH_CHIP_ESP32C3

This is part of deprecating esp32c3-devkit as esp32c3-legacy and
using esp32c3-generic (now esp32c3-devkit) instead.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-03 13:45:13 +08:00
Filipe Cavalcanti
0158eda813 arch/risc-v/espressif: add PWM capture getedges function
Create esp_capture_getedges function which was missing from
the capture API.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-03 13:44:25 +08:00
Filipe Cavalcanti
027bc43df7 arch/xtensa/espressif: add PWM capture getedges function
Create esp_capture_getedges function which was missing from
the capture API.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-03 13:44:25 +08:00
simbit18
bb66e96023 arch/arm/src/stm32l4: Removed repeated addition of CONFIG_STM32L4_IWDG
- Removed

   if(CONFIG_STM32L4_IWDG)
      list(APPEND SRCS stm32l4_iwdg.c)
   endif()

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-12-03 08:36:06 +08:00
simbit18
0af53187b5 arch/arm/src/kl: CMake build implemented for NXP KL Series Arm MCUs
- added NXP KL Series Arm MCUs

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-12-02 02:42:55 +08:00
Eren Terzioglu
6b53141c9e arch/xtensa/esp32[-s2|-s3]: Refactor PM support
Refactor PM modes for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-12-02 02:37:06 +08:00
Jukka Laitinen
5ae35b619a arch/mpfs/mpfs_ddr.c: Improve CA training validity check heuristics
Update the CA training result check to match the HSS reference code.

The original check which required phase delays to be 5 taps separated was wrong.
This has also been removed from the HSS.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-12-02 02:36:55 +08:00
Jukka Laitinen
3560a28eef arch/mpfs/mpfs_ddr.c: Make sure eye doesn't grow past the window end
The window is 32 taps, so in order to the eye to be completely inside the window,
the (offset + width) has to be less or equal than (32 - margin).

Add this additional sanity check in the mpfs_training_verify.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-12-02 02:36:55 +08:00
wangchengdong
930cc984a2 arch/tricore: Fix build errors in Tricore architecture
Fix build errors in the Tricore architecture caused by the missing `lock`
member in `struct tricore_systimer_lowerhalf_s`, as well as the missing
definition of the `IFX_CFG_CPU_CLOCK_FREQUENCY` macro.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-12-02 02:35:59 +08:00
hujun5
9461c70fcd x86_64: fix bootup problem in SMP
We need to initialize the per - CPU registers as early as possible.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-12-01 14:28:11 +01:00
Jukka Laitinen
2e9a43571a arch/imx9/ethernet: Add a configuration option to use HPWORK queue
Add an option to use HPWORK queue for ethernet driver, to reduce
delays if more time critical messaging via ethernet is wanted.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-12-01 10:20:29 -03:00
Kerogit
5318c1aa78 arch/avr/src/avrdx: add support for TWI (I2C and SMBus) peripheral
This patch adds support for Two-Wire interface in AVR Dx chips.
Only master mode is supported in this version.

The driver was tested using TC74Ax thermal sensor and simple application
that read the temperature from it. (Driver for the sensor is not in-tree.)

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-12-01 19:12:26 +08:00
Kerogit
b8e4ced860 arch/avr/src/avrdx: fix missing code for alternate pin positions
The Kconfig configuration was offering alternate routing options
for USART peripherals but there was no code which would act
on those settings. This patch fixes it.

Additionally, since the code is being worked on, this patch
also renames USART-related configuration options from AVR_HAS_
to AVR_HAVE_ . This is based on GitHub and mailing list discussion
where it was pointed out that other architectures use "HAVE".

Patch was tested by choosing few combinations of the configuration
and verifying which registers are being set in disassembly. Base
configuration was also tested by an application that uses two ports.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-12-01 19:12:26 +08:00
Kerogit
48585b21b5 arch/avr: fix MCU type for 64 pin chips
Toolchain.defs file was treating all supported chips as AVR128DA28,
which became apparent while testing changes in USART handling.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-11-29 09:48:11 -05:00
Eren Terzioglu
d4c76b1f60 arch/risc-v/esp32[-c3|-c6|-h2]: Add deep sleep support
Add deep sleep support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-11-29 14:35:34 +08:00
Eren Terzioglu
8417cf0c83 arch/risc-v/esp32[-c3|-c6|-h2]: Add PM support
Add PM support for esp32[-c3|-c6|-h2]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-11-29 14:35:34 +08:00
Michal Lenc
5743edd0e9 arch/arm/src/samv7/sam_qspi_spi.c: add support for SPI_SETDELAY
This commit adds support for SPI_SETDELAY operation on SAMv7 QSPI
peripheral running in SPI mode. The logic is the same as for standard
SPI peripheral, just different registers. The change allows to set
custom delays between transfers, chip selects and so on.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-11-27 22:46:03 +08:00
Vlad Pruteanu
70455f1890 xtensa/esp32: Add support for hardware accelerated HMAC-SHA
This add support for using the cryptographic accelerator
within the ESP32 for HMAC-SHA operations. The supported
algorithms are: SHA1 and SHA512.

Signed-off-by: Vlad Pruteanu <pruteanuvlad1611@yahoo.com>
2025-11-27 03:38:09 +08:00
Max Kriegleder
a9ecff5f1c arch/arm/{nrf52|nrf53|nrf91}/i2c: fix I2C bus getting stuck during read
During I2C read, one-too-many byte is read, which can lead to the I2C bus
getting stuck. This is likely due to the STOP condition being set at the
wrong time or being missed completely. The chip offers a shortcut, such
that the STOP condition is set automatically after the last byte is being
written/read.

Signed-off-by: Max Kriegleder <max.kriegleder@gmail.com>
2025-11-24 14:57:10 +01:00
ouyangxiangzhen
a923cfe4ed arch/riscv: Fix bl602 start_absolute.
This commit fix bl602 start_absolute.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
b540618e9f driver/timers: Simplify the up_timer_initialize.
This commit simplified the up_timer_initialize.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
b1dd15e6e5 arch/riscv: Remove kmalloc.h for mtime driver.
This commit removed kmalloc.h for mtime driver.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
ee32bd44e0 arch/risc-v: Add clkdev drivers for esp32 timers.
This commit added clkdev drivers for esp32 timers.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
882c663a4f arch/riscv: Add clkdev driver for esp32c3-legacy.
This commit added clkdev driver for esp32c3-legacy.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
f9e894e490 arch/riscv: Add clkdev driver for bl602 timer.
This commit added clkdev driver for bl602 timer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
a5e64a0a5c arch/riscv: Add CONFIG_ONESHOT condition for riscv_mtimer.c.
This commit added CONFIG_ONESHOT condition for riscv_mtimer.c

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
2227f232f0 arch/risc-v: Add clkdev driver for mtime.
This commit added clkdev driver for risc-v machine timer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
b2fc959e40 risc-v/bl602: Fix boot issue caused by atomic instructions.
Since the bl602 do not support the atomic extention, we should compile
it with `-march=rv32imfc`, or it will fail to boot when executing the
`lr.w` instruction.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
fd4d93e928 arch/risc-v: Ensure the timer setting atomicity on 32-bit platforms.
This commit guaranteed the timer setting atomicity on 32-bit platforms.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
f2585f3042 arch/intel64: Added clkdev driver for oneshot_lower.
This commit addedd clkdev driver for oneshot_lower.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
c8c9dbd127 arch/intel64: Added clkdev driver for TSC-deadline.
This commit added clkdev driver for TSC-deadline.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
chenxiaoyi
6308167c45 arch/sim: fix oneshot driver to work with both signal and sleep
This commit fixed oneshot driver to work with both signal and sleep.

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
29bf45c371 arch/sim: Add clkdev driver for sim.
This commit added clkdev driver for sim.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
buxiasen
8cb0e654a3 arch/armv8-r/timer: fix the UINT64_MAX mask cause tick mode no isr
When TICKLESS not enabled, up_alarm_set_lowerhalf will call start, if we
overwrite the compare register will cause TICK mode no longer isr.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-11-24 19:43:07 +08:00
husong1
482de93342 arch/arm: Fix the arm timer's maximum delay to be a 64-bit integer.
This commit fixed the arm generic timer's maximum delay.

Signed-off-by: husong1 <husong1@xiaomi.com>
2025-11-24 19:43:07 +08:00
husong1
80463c8b06 arch/armv7r: Add armv7r clkdev timer driver.
This commit added armv7r clkdev timer driver.

Signed-off-by: husong1 <husong1@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
996f110925 arch/arm: Add clkdev driver for generic timer.
This commit added clkdev driver for arm generic timer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
d335cce43a arch/arm64: Add clkdev driver for generic timer.
This commit added clkdev driver for arm64 generic timer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
SPRESENSE
b2b045252d arch: cxd56xx: Fix failure to get RTC time in multi-core environment
In multi-core environment where NuttX runs on each core, if one core
sets the RTC time, the RTC value gotten on other cores is incorrect.

This is caused by clock_gettime(CLOCK_MONOTONIC) function used to get
elapsed time, which uses a core-specific global varaiable g_basetime
as the base time.

To fix this, update the g_basetime from the backup SRAM that can be
shared between cores in setting/getting the RTC time.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-11-20 20:56:05 +08:00
Jukka Laitinen
f641298d9e arch/imx9: Enable manual control for LPSPI PCS signals
Add a function imx9_lpspi_select_cs to assert CS at the start of
an SPI transfer and keep it asserted until called again to
de-assert it. This can be called by board-provided imx9_lpspi_select,
in case the CS needs to be controlled via the LPSPI block and not
GPIO.

The TCR register CONT (continue) bit is asserted to prevent CS toggling
during the transfer, and the PCS bits are set to mark the correct CS

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-11-19 12:28:32 -03:00
Jukka Laitinen
fbd27c045b arch/imx9: Correct LPSPI TCR register PCS bit definitions
According to the TRM, only bits 24-25 are reserved for chip select, and
the maximum number of internal chip selects is 3 (on LPSPI4 bus only).

Fix the TCR_PCS_MASK and remove extra definitions.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-11-19 12:28:32 -03:00
ouyangxiangzhen
ff5944d8fc arch/tricore: Add the clkdev driver for tricore.
Some checks failed
Build Documentation / build-html (push) Has been cancelled
This commit added the clkdev driver for tricore.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-19 12:24:56 +08:00
v-tangmeng
a221df7175 arch/xtensa/esp32[-s2|-s3]: add USE_NXTMPDIR_ESP_REPO_DIRECTLY
Directly downloading the Git repository is inconvenient for local debugging.
This will allow to automatically download external packages from the Internet.
If not set, the repo need to be download will need to provide them manually,
otherwise an error will occur and the build will be aborted.

Add `USE_NXTMPDIR_ESP_REPO_DIRECTLY`, with this we can use
`USE_NXTMPDIR_ESP_REPO_DIRECTLY=y make` which can directly use esp-hal-3rdparty
under nxtmpdir without CLONE, CHECK_COMMITSHA, reset, checkout and update. Just
`cp -rf nxtmpdir/esp-hal-3rdparty chip/$(ESP_HAL_3RDPARTY_REPO)`.

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2025-11-18 21:46:50 +08:00
ouyangxiangzhen
7e7828b3f6 timers/oneshot: Remove oneshot tick API.
This commit removed all oneshot tick API for new clkdev API.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00
ouyangxiangzhen
fc28b93224 timers/oneshot: Remove all callback and args.
This commit remove all callback and args in the APIs.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00
ouyangxiangzhen
5c113f79b7 timers/oneshot: Remove all private callback.
This commit removed all private callback and handle it on the upperhalf
of oneshot.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00
ouyangxiangzhen
f70ec7384b arch/risc-v: revert oneshot drivers to timespec API.
This commit reverted oneshot drivers to timespec API.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00