Curently, the driver code for HW accelerated AES is not usable
since it's not registered within esp32_crypto. This commit fixes
it as well as a few bugs.
Signed-off-by: Vlad Pruteanu <pruteanuvlad1611@yahoo.com>
Migrated legacy README.txt documentation to RST format which aligns with
the standard template for board documentation.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Migrated legacy README.txt documentation to RST format following the
standard board documentation template.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Migrate README.txt about ROMFS to SIM documentation in RST format. Also
cleans up the formatting of the board documentation to leverage RST's
features.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Fix exception issue when PM and DEBUG_ASSERTIONS enabled for esp32 and esp32s3.
This error happens due to PM system workflow, when system gets into sleep-modes with
removing PM_NORMAL count, system is raising an exception for not having
enough number of PM_NORMAL state count if DEBUG_ASSERTIONS enabled.
Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
- CMake added board Raspberry Pi Pico 2 RISC-V
- Created a file rp23xx_common_pico.h with function
prototype
int rp23xx_dev_gpio_init(void);
to allow cmake + ninja to build without errors.
Signed-off-by: simbit18 <simbit18@gmail.com>
If the compiler optimization is disabled, the stack-usage of inlining functions will not be optimized.
In this case, force inlining can lead to stack-overflow (e.g.
qemu-armeabi-v7a-bl). This commit replaced the definition of the
always_inline_function and inline_function with the inline
keyword to avoid force-inlining.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit provided a better invdiv_u32 implementation on 64-bit architectures. The test results showed it is 25% faster than the original implementation on x86_64.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit implemented optimized runtime-invariant integer division
proposed by T. Granlund and L. Montgomery. It can be used to convert the
hardware clock cycles to seconds, where the clock frequency is runtime-invariant.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
When closing a serial port an ongoing TX DMA transfer will be stopped. This can cause
one (or multiple) the following:
- dev->dmatx.length != 0
- dev->dmatx.nlength != 0
- stm32_dmaresidual returning a non-zero residual
This is caused by length/nlength not being set to 0 at startup or during closing.
In addition the DMA_SxNDTR register is not set to 0 at startup or during closing.
This commit solves the issue by setting the variables and register to 0 during closing.
Signed-off-by: Alexander Lerach <alexander@auterion.com>
arch/arm/stm32h7: Add review feedback regarding style
Removed non-needed spaces.
Aligned style of documentation.
Signed-off-by: Alexander Lerach <alexander@auterion.com>
The nxsched_switch_context() function should only be called
when a task switch actually occurs. The RISC-V architecture
already performs this call in riscv_perform_syscall(),
so this PR removed the redundant nxsched_switch_context() call in
up_switch_context().
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Updates the common source code for the SPI peripheral used by
Espressif's RISC-Vs SoCs. This enables newer SoCs to be supported
in the future while maintaining backwards compatibility.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
Replace direct access to the g_waitingforsignal list with the
NuttX-defined macro list_waitingforsignal() to improve code
consistency and maintainability.
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
Simplify the CMake scripts by removing redundant logic to
improve code readability and maintainability.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Introduce a new function nxsched_tick_expiration() to replace
nxsched_alarm_tick_expiration(). The new function provides a
common implementation that can be shared by both the alarm
and timer architectures.
This change reduces code duplication and provides a unified
function that can be directly reused.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Improve nxclock_gettime(), to get the system time excluding
the time that the system is suspended, when the clockid is
CLOCK_MONOTONIC
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
Replace direct usage of g_system_ticks with clock_increase_sched_ticks()
and clock_get_sched_ticks()
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
In the current NuttX kernel implementation, there is no function
to represent pure scheduler ticks.
The existing clock_systime_ticks() cannot serve this purpose,
because it keeps increasing even when the scheduler is not running.
This happens since the returned value reflects real hardware time:
as long as the timer or alarm hardware is active,
clock_systime_ticks() will continuously increase.
This patch introduces two new functions that provide access to
scheduler ticks — a counter that only increases when the scheduler
itself is running.
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
Clean up the CMake configuration by removing the obsolete
`BUILD_OOTCPP` guard. This variable is no longer required
since out-of-tree build handling is now managed via the
enhanced `nuttx_add_subdirectory()` with EXCLUDE support.
* Simplifies CMake configuration command.
* Avoids redundant or unused build options.
Signed-off-by: trns1997 <trns1997@gmail.com>
This commit refactors the I2S common driver for Espressif's RISC-V
SoCs. Previously, the peripheral was not working as expected.
Along with the new I2S character driver, this new I2S lower-half
driver can be easily tested using internal loopback between the
transmitter and receiver channels.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
Adds Kconfig knobs for the ESP32-S3 RX FIFO full threshold and timeout and wires them into the UART driver.
Clears RX FIFO overflow interrupts by resetting the hardware FIFO so reception resumes cleanly.
Signed-off-by: Thiago Finelon <thiago.sfinelon@gmail.com>
Nuttx currently has 2 types of sleep interfaces:
1. Signal-scheduled sleep: nxsig_sleep() / nxsig_usleep() / nxsig_nanosleep()
Weaknesses:
a. Signal-dependent: The signal-scheduled sleep method is bound to the signal framework, while some driver sleep operations do not depend on signals.
b. Timespec conversion: Signal-scheduled sleep involves timespec conversion, which has a significant impact on performance.
2. Busy sleep: up_mdelay() / up_udelay()
Weaknesses:
a. Does not actively trigger scheduling, occupy the CPU loading.
3. New interfaces: Scheduled sleep: nxsched_sleep() / nxsched_usleep() / nxsched_msleep() / nxsched_ticksleep()
Strengths:
a. Does not depend on the signal framework.
b. Tick-based, without additional computational overhead.
Currently, the Nuttx driver framework extensively uses nxsig_* interfaces. However, the driver does not need to rely on signals or timespec conversion.
Therefore, a new set of APIs is added to reduce dependencies on other modules.
(This PR also aims to make signals optional, further reducing the code size of Nuttx.)
Signed-off-by: chao an <anchao.archer@bytedance.com>
Nuttx currently has 2 types of sleep interfaces:
1. Signal-scheduled sleep: nxsig_sleep() / nxsig_usleep() / nxsig_nanosleep()
Weaknesses:
a. Signal-dependent: The signal-scheduled sleep method is bound to the signal framework, while some driver sleep operations do not depend on signals.
b. Timespec conversion: Signal-scheduled sleep involves timespec conversion, which has a significant impact on performance.
2. Busy sleep: up_mdelay() / up_udelay()
Weaknesses:
a. Does not actively trigger scheduling, occupy the CPU loading.
3. New interfaces: Scheduled sleep: nxsched_sleep() / nxsched_usleep() / nxsched_msleep() / nxsched_ticksleep()
Strengths:
a. Does not depend on the signal framework.
b. Tick-based, without additional computational overhead.
Currently, the Nuttx driver framework extensively uses nxsig_* interfaces. However, the driver does not need to rely on signals or timespec conversion.
Therefore, a new set of APIs is added to reduce dependencies on other modules.
(This PR also aims to make signals optional, further reducing the code size of Nuttx.)
Signed-off-by: chao an <anchao.archer@bytedance.com>