Fix bug in temperature sensor driver where direct casting of lower half
structure pointer could lead to incorrect memory access.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Fix bug in temperature sensor driver where direct casting of lower half
structure pointer could lead to incorrect memory access.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This patch addresses several issues and adds enhancements to the WWDG
(Window Watchdog) implementation for the STM32H7 platform. The changes
include:
- Extend the definitions of WWDG_CFR_PCLK1 macros to support dividers
up to 128, and update the stm32_settimeout() function to consider this
extended range.
- Fix the "elapsed" calculations in the stm32_getstatus() function to
ensure correct time remaining calculations.
- Clear the EWIF (Early Wakeup Interrupt Flag) bit in the stm32_start()
function, as this bit might be set by hardware before the watchdog is
actually started.
- Initialize the WWDG clock in the RCC_APB3ENR register and set the
RCC_GCR_WW1RSC bit as per the STM32 reference manual to ensure proper
behavior when enabling the WWDG1.
Signed-off-by: Szymon Magrian <szymon.magrian@hexagon.com>
This commit updates the common source code for the timers used for
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>
Adds support for init script on ESP32 and ESP32-S2.
Moves the scripts of ESP32-S3 from board specific to
board common (they are the same).
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
This commit fixes the incompatible pointer type issue due to
incompatible types of the `bitexchange_t` callback.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
The interrupt handler accesses the device as well as the driver's private
data. Use critical_section for mutual exclusion with drivers/usbdev, which
also protects the same data with critical_section.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
These archs only align the size of the stack, forgeting to do the
stack start addr alignment, this patch fixes it.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add documentation for new oa_tc6 defconfig into esp32c6-devkitc and esp32c6-devkitm boards docs.
Signed-off-by: michal matias <mich4l.matias@gmail.com>
SAME70J and SAMV70J series (64 pin packages) have two USART peripherals
and three UART peripherals. Ensure USART peripherals are enabled.
This is consistent with datasheet, USART0 also physically tested
on SAME70J21 MCU.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Adds conditional compilation of the stm32_ltdc.c file to the source list
(SRCS) for STM32H7 architecture when the CONFIG_STM32H7_LTDC option is
enabled in the configuration.
Signed-off-by: Sergey Rzhevsky <rzsa@yandex.ru>
The stack alignment operation in tricore and arm porting
only aligns the size of the stack, forget to align the start addr
of the stack, this patch fixes it.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Provide better hex and srec generation for tasking compiler, without relying
on freeware tricore-elf-objcopy.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add condition checking in Kconfig source statement, for example:
source "arch/arm/Kconfig" is updated to:
if ARCH_ARM
source "arch/arm/Kconfig"
endif
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Use the exported CMake toolchain file instead of a custom and broken one.
Slightly modify the C++ example code to introduce modern tools like auto keyword and shared_ptr
Signed-off-by: Philippe Leduc <philippe.leduc@mailfence.com>
tasking compiler toolset does not provide binary generate tool,
but the open source gcc compiler is able to do this, this patch will
use tricore-elf-objcopy to generate raw binary and hex file when using
tasking compiler to do the compiling and linking.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
In current implementation, when doing syslog_write(), there may
be more than one channel, the syslog will iterate each channel,
but only return the bytes writen through the last channel, the
better way should be returning the maximum bytes writen
through one channel.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Fixes low and inconsistent bandwidth issues.
Adds new configuration options for buffer management.
Moves code around to make the implementation cleaner and easier to debug.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Initial I2C implementation such that I2C sending and receiving now
works well enough to use the BMP280 driver for a BMP280 device connected
to any of I2C0-I2C6 on the default pins. I2CTOOL also works for these
interfaces.
Functionality for "no stop" and "no start" options is not present.
Implementing that is not clear from the peripheral datasheet and will be
a challenge.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Migrated the legacy README.txt to RST format. I removed some information
which no longer applies since 2008 when this documentation was written.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Since the alignment of the signal context is affected by XCPTCONTEXT_SIZE in
different Kconfig, sometimes the stack pointer is not aligned to 8 bytes, this
is not what the software and compiler expect, for example, if va_list() obtains
wide data of type long long, the offset will be wrong, So in this commit, we set
stack-aligned the base offset so that the correct offset will be set during context
restoration.
1. test code:
| void signal_handler(int signo, siginfo_t *info, void *context) {
| long long ttt = 1024000;
| printf("%lld\n", ttt);
| }
|
| struct itimerspec its = { .it_value.tv_sec = 1,
| .it_value.tv_nsec = 0,
| .it_interval.tv_sec = 1,
| .it_interval.tv_nsec = 0
| };
|
| int main(int argc, FAR char *argv[])
| {
| struct sigevent evp;
| timer_t timer_id;
|
| memset(&evp, 0, sizeof(evp));
| evp.sigev_notify = SIGEV_SIGNAL | SIGEV_THREAD_ID;
| evp.sigev_signo = SIGALRM;
| evp.sigev_notify_thread_id = gettid();
|
| timer_create(CLOCK_REALTIME, &evp, &timer_id);
|
|
| struct sigaction sa;
| memset(&sa, 0, sizeof(sa));
| sa.sa_sigaction = signal_handler;
| sa.sa_flags = SA_SIGINFO;
| sigemptyset(&sa.sa_mask);
|
| sigaction(SIGALRM, &sa, NULL);
|
| timer_settime(timer_id, 0, &its, NULL);
|
| while (1)
| sleep(1);
|
| return 0;
| }
2. before this change:
| NuttShell (NSH) NuttX-12.10.0
| nsh> hello
| 4398046527890440
| 4398046527890472
| 4398046527890504
| 4398046527890536
3. after this change:
| NuttShell (NSH) NuttX-12.10.0
| nsh> hello
| 1024000
| 1024000
| 1024000
| 1024000
Signed-off-by: chao an <anchao.archer@bytedance.com>
This commit adds documentation to the almost empty `calib_udelay` page
as part of #11081. It provides reasoning for the example, an explanation
of what it does and why `CONFIG_BOARD_LOOPSPERMSEC` is necessary, and
also shows some example console output of the program.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>