Current timer hardware supports both absolute and relative count timers. Without an absolute count timer interface, setting an alarm timer might incur additional overhead in obtaining the current time, resulting in performance degradation and inaccurate timing.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit introduce new clockdevice interfaces for oneshot.
- It can represent both `timer` and `alarm`.
- It simplifies the implementation of timer driver. Timer driver do not need considering the time conversion between clock count, tick and timespec.
- It sets timer align to the tick boundary to improve timer accuracy.
- It can avoid using 64-bit division during timer expiration interrupt, improves performance and reduces interrupt latency.
- It considers almost all multiplication overflow problems in time conversion without processing at the driver.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
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>
Adds a device ID to ee25xx_initialize, which is stored in the
ee25xx_dev_s structure. This ID is used when calling SPI_SELECT.
The implementation is based on the handling of the chip select in
mtd/ramtron.c
This change is NOT backward compatible: the function signature has changed
Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com>
Adds a device ID to at25ee_initialize, which is stored in the
at25ee_dev_s structure. This ID is used when calling SPI_SELECT.
The implementation is based on the handling of the chip select in
mtd/ramtron.c
This change is NOT backward compatible: the function signature has changed
Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com>
As reported by a user in Discord channel selection BMI160 with SPI
interface still showing the I2C configuration. This patch fixes it.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
- Updated information about the RA4M1 microcontroller capabilities, including the General Purpose Timer (GPT).
- Added information about the PWM driver support for the Arduino R4 Minima board using the GPT timer.
Signed-off-by: leocafonso <leocafonso@gmail.com>
- Added PWM support on Arduino R4 Minima board.
This board has 5 PWM channels available using the GPT timer from the RA4M1 microcontroller.
- Added a pwm config file to enable PWM supporting GTP2 GTIOCB on P102.
Signed-off-by: leocafonso <leocafonso@gmail.com>
- Added PWM driver support for the RA4M1 microcontroller using the GPT timer.
- This driver supports Saw-wave mode and one of the two output channels (A or B).
- Added necessary configurations in CMakeLists.txt, Kconfig, and Make.defs.
- Created new header file for GPT.
Signed-off-by: leocafonso <leocafonso@gmail.com>
This commit added the clkcnt abstraction.
Clkcnt is used to abstract the cycle counter of hardware timer, which can represent almost all existing timers. Time conversion through API provided by clkcnt can avoid any timing conversion problem (multiplication overflow, division precision loss, etc.).
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit added support for pure function attributes and compile-time
constant condition.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
If the initial value of the MSR_IA32_TSC_ADJUST register is not 0 (may be modified by BIOS or bootloader), it may cause timing errors. This commit addressed the issue.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
On newer x86 CPUs, the MSR_IA32_TSC_ADJUST register is utilized to fine-tune the offset of the Time Stamp Counter (TSC). This commit introduces support for MSR_IA32_TSC_ADJUST and enhances the TSC tickless
driver, optimizing its performance.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit aligned the arm64 generic timer count to the tick boundary. Notice that this is just a work-around. We should pass both the current system ticks and the delay ticks as input parameters. But we only have the delay tick here due to the oneshot interfaces.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This patch adds the description for NSH_BUILTIN_AS_COMMAND including its advantage and disadvantage.
NSH_BUILTIN_AS_COMMAND is an optional configuration in nsh. It allows nsh builtin apps to run directly like nsh command without creating a thread. This is done in pull request https://github.com/apache/nuttx-apps/pull/3168
Signed-off-by: Haokun Dong <donghaokun@lixiang.com>
The improvement includes symbols that help employees visualise any errors detected during the PR check phase (check.yml).
Error -> ❌ U+274C Cross Mark
https://en.wikipedia.org/wiki/X_mark
Checks pass -> ✔️ U+2714 Heavy Check Mark
https://en.wikipedia.org/wiki/Check_mark
These characters are emojis that are recognized by the Unicode standards which define what each character represents.
Signed-off-by: simbit18 <simbit18@gmail.com>
Adds another configuration which includes the CGOL game application.
This gives users something animated and interesting to see on the HDMI
video output, since the frame-buffer example is not as interesting.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Espressif common initialization and lib_cxx_initialize are having
conflicts and multiple linker script issues.
Removing CXX_INITIALIZE solves those problems with no side effects.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Use clock_get_sched_tclock_systime_ticks() to access system ticks
in order to fix the build error and improve code safety.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Make g_system_ticks a static variable, as it is only accessed by
clock_get_sched_ticks().
This change improves code modularity and enhances safety, since
clock_get_sched_ticks() performs proper synchronization when
reading g_system_ticks.
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
The .align N syntax in GHS means the alignment is N Bytes. In GCC
compiler, it means 2**N Bytes. Therefore, .align 32 in GHS and
.align 5 in GCC are equivalent.
Co-authored-by: Chengdong Wang <wangchengdong@lixiang.com>
Signed-off-by: xiezhanpeng3 <xiezhanpeng3@lixiang.com>
The $+0x0 is not accepted by Ghs compiler. Therefore, we change it to a
more common syntax " b ." for endless self loop.
Signed-off-by: xiezhanpeng3 <xiezhanpeng3@lixiang.com>
The GreenHills Compiler uses Unified Assembler Language by default and
it does not recognize .syntax unified instruction. Therefore, remove
them if GHS compiler is used.
Co-authored-by: Chengdong Wang <wangchengdong@lixiang.com>
Signed-off-by: xiezhanpeng3 <xiezhanpeng3@lixiang.com>
The GreenHills Compiler uses different grammer for the .type directive
in asm, this patch adds support for the grammer for arm-v8r.
Similar change for arm-v7r was done in pull request #12883.
Co-authored-by: Chengdong Wang <wangchengdong@lixiang.com>
Signed-off-by: xiezhanpeng3 <xiezhanpeng3@lixiang.com>