Commit Graph

51888 Commits

Author SHA1 Message Date
raiden00pl
e1b947cd52 stm32/stm32_foc.c: rename some macros
change the names to be the same as for stm32f7/stm32_foc.c
2023-11-15 03:44:17 -08:00
raiden00pl
c0ffcca0e8 boards: remove obsolete CONFIG_EXAMPLES_FOC_IPHASE_ADC option 2023-11-15 03:43:25 -08:00
Xu Xingliang
6e7115ca09 mm: free delay list when exceeding specified count
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2023-11-15 12:05:20 +01:00
Petteri Aimonen
6dabcd567e stm32/samv7: Update SysTick drivers to new up_adjtime() API. 2023-11-14 19:47:40 -08:00
Petteri Aimonen
1825f9534c adjtime: Rewrite implementation to work for RTC and tickless kernel
Previous adjtime() implementation was limited to adjusting system
timer tick period. This commit reimplements the internals to use
a kernel watchdog timer. Platform-independent part of the code now
works also for adjusting hires RTC and tickless timer rate.

User code facing API is unchanged. Architecture code API has changed:
up_adj_timer_period() is replaced by up_adjtime().

Other improvements:

- Support query of remaining adjustment by passing NULL to first
  argument of adjtime(). This matches Linux behavior.

- Improve resolution available for architecture driver, previously
  limited to 1 microsecond per tick. Now 1 nanosecond per second.
2023-11-14 19:47:40 -08:00
Eren Terzioglu
4033018a72 xtensa/esp32s3: Add XTWDT support 2023-11-14 19:42:33 -03:00
chao an
d63034994e fs/inode: check file list before memcpy
The file list is NULL if task group initialized, check the validity
of the file list before memcpy.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-14 19:11:32 -03:00
Michal Lenc
0554b975da s25fl1: fix compile warnings caused by incorrect variable print format
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-11-14 09:08:08 -08:00
rongyichang
52d516ab46 drivers/lcd: change lcd stride from pixel to bytes
In order to achieve better scalability, change the stride
from pixel mode to byte mode.For example, in the case of RGB888
mode with 466 pixels in width and a 4-byte aligned buffer,it is
only necessary to extend the buffer of one line from 1398 bytes
to 1400 bytes, instead of extending it to 1404 bytes.

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-11-14 07:30:29 -08:00
raiden00pl
99513ac23e drivers/foc: return scaling factor for phase currents and BEMF via ioctl
These values are board-specific properties that must be known on the application side.
Until now, these values had to be hardcoded on the application side.
2023-11-14 04:34:49 -08:00
raiden00pl
7d99f01cf7 drivers/foc: get hardware information via lower-half interface 2023-11-14 04:34:49 -08:00
Masayuki Ishikawa
5f15c73219 Documentation, tools: Bump xpack-riscv-none-elf-gcc to 12.3.0-2
Summary:
- Upgraded to xpack-riscv-none-elf-gcc-12.3.0-2 to resolve symbol recognition
  issues in riscv-none-elf-gdb, as reported in
  https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/issues/22.

Impact:
- Expected to enhance toolchain stability with no negative side effects.

Testing:
- Verified with rv-virt:netnsh and rv-virt:netnsh64 configurations

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-11-14 12:33:36 +01:00
Eren Terzioglu
d92a7011fd xtensa/esp32s3: Add RWDT support 2023-11-13 21:04:30 -03:00
raiden00pl
0e40cc2853 stm32/stm32_adc.c: protect irq_attach with refcounter
irq_attach should only be called once for ADCs that share a common interrupt handler.
We can move irq_attach to just before interrupts are enabled.
2023-11-13 21:03:36 -03:00
raiden00pl
225d5bba6e stm32/foc: add support for board-specific ioctl 2023-11-13 08:40:11 -08:00
Ville Juven
b3f20d4bd6 uart_tcsendbreak: Remove cancel point, as tcsendbreak is not one
Reference:
https://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html
2023-11-13 08:11:24 -08:00
raiden00pl
7996266f6e drivers/segger/Kconfig: cosmetics 2023-11-13 06:08:30 -08:00
Xiang Xiao
459f8235e4 arch/arm: Let's old arm's arm_doirq return register context like armv7-a
and remove the duplicated arm_doirq and arm_ack_irq prototype

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-13 11:41:56 +01:00
Takumi Ando
c076cb1bef rp2040: pwm: Fix errors at CONFIG_PWM_NCHANNELS=1
Perhaps it has never been tested with CONFIG_PWM_NCHANNELS=1.

Signed-off-by: Takumi Ando <t-ando@advaly.co.jp>
2023-11-13 11:40:22 +01:00
Takumi Ando
4e89313913 Documentation: flipperzero: Fix typo
Signed-off-by: Takumi Ando <t-ando@advaly.co.jp>
2023-11-13 11:39:56 +01:00
yinshengkai
c3009d46e9 note: delete sched_note_flatten
When we record data and dump data, they are all executed within the system,
and there is no need to consider the issue of big or small endianness.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-11-12 23:52:10 -08:00
chao an
74d698f439 spinlock: add __cplusplus check to avoid build break with C++
stdatomic.h is incompatible with C++

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-12 17:01:13 -08:00
chao an
3b2c585ab7 fs/inode: add common function to get file count from list
common function to get file count from file list

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-12 17:01:13 -08:00
chao an
0a567bbae4 fs/inode: improve the performance of get file pointer
Remove file locks and enter critical sections to protect file lists

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-12 17:01:13 -08:00
Rodrigo Sim
66ccaed5ce stm32f4/stm32f401rc-rs485: add support to userleds 2023-11-12 16:58:31 -08:00
Xiang Xiao
0d42f1b3cf arch/sim: Replace [enter|leave]_critical_section with up_irq_[save|restore]
since it's enough to protect per cpu data with irq disabling

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-12 18:28:05 +01:00
halyssonJr
e1274d1c42 fix backlight GPIO, add backlight control, and add LVGL defconfig 2023-11-11 20:04:51 -08:00
Jorge Guzman
82af87f896 stm32h7/linum-stm32h753bi: Added suport to userlerds library.
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2023-11-11 20:02:53 -08:00
Xiang Xiao
0fbeea64d5 mm: Remove mm_spinlock
since it's enough to protect per cpu delay list by disabling interrupt

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-12 11:27:38 +08:00
dongjiuzhu1
0b832fd127 driver/usbdev: return -ENOTCONN when usbdev had been unbind
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-11-11 21:09:59 +08:00
dongjiuzhu1
20401c202e driver/usbdev: add unlink flags to better release endpoint resource
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-11-11 21:09:59 +08:00
dongjiuzhu1
b64dd8bed0 sim/raw_gadget: let's raw_epxhandle exit when unregister usbdev
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-11-11 21:09:59 +08:00
dongjiuzhu1
839eaacbcc sim/usbdev: add clase disconnect when usbdev_unregister
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-11-11 21:09:59 +08:00
dongjiuzhu1
f6098244f6 driver/usbdev_fs: fix minor issue about unbind
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-11-11 21:09:59 +08:00
chenwen@espressif.com
b6e09955dd xtensa/esp32s3: Support multiple PHY init data bin
1. If CONFIG_ESP32S3_PHY_INIT_DATA_IN_PARTITION and CONFIG_ESP32S3_SUPPORT_MULTIPLE_PHY_INIT_DATA are enabled,
PHY initialization data (PHY initialization data is used for RF calibration) will be loaded from a partition.

2. The corresponding PHY init data type can be automatically switched according to the country code,
China's PHY init data bin is used by default, country code can be modified through the wapi command: wapi country <ifname> <country code>.

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2023-11-10 15:55:14 -03:00
chenwen@espressif.com
cc10c54f6c xtensa/esp32s3: Support partition and OTA device
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2023-11-10 15:55:14 -03:00
Xiang Xiao
122558a1de arch/armv8-m: Fix typo error for NVIC_SYSHCON_HARDFAULTPENDED
and the comment too

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-10 15:44:03 -03:00
David Sidrane
a92bd5d081 s32k1xx:Serial Do not wait on TXDMA semaphore
If using flow control with a high CTS the thread may be
    blocked forever on the second transmit attempt due to waiting
    on the txdma semaphore.  The calling thread can then never
    make progress and release any resources it has taken, thus
    may cause a deadlock in other parts of the system.

    The implementation differs in behavior from interrupt-driven
    TX. It should not implicitly wait on a taken semaphore but
    return immediately and let the upper layers decide on what to
    do next.
2023-11-10 22:30:41 +08:00
David Sidrane
8362e3147e s32k3xx:Serial Do not wait on TXDMA semaphore
If using flow control with a high CTS the thread may be
    blocked forever on the second transmit attempt due to waiting
    on the txdma semaphore.  The calling thread can then never
    make progress and release any resources it has taken, thus
    may cause a deadlock in other parts of the system.

    The implementation differs in behavior from interrupt-driven
    TX. It should not implicitly wait on a taken semaphore but
    return immediately and let the upper layers decide on what to
    do next.
2023-11-10 22:30:41 +08:00
David Sidrane
54b4cd3bf3 imxrt:Serial Do not wait on TXDMA semaphore
If using flow control with a high CTS the thread may be
    blocked forever on the second transmit attempt due to waiting
    on the txdma semaphore.  The calling thread can then never
    make progress and release any resources it has taken, thus
    may cause a deadlock in other parts of the system.

    The implementation differs in behavior from interrupt-driven
    TX. It should not implicitly wait on a taken semaphore but
    return immediately and let the upper layers decide on what to
    do next.
2023-11-10 22:30:41 +08:00
SPRESENSE
63182d43b9 libm/newlib: Change the download site to https
Change newlib download site from ftp to more secure https.
2023-11-10 16:28:13 +08:00
dongjiuzhu1
1fc3de4518 arch/textheap: add _heapmember declare for text and data heap
It was accidentally deleted on PR:#11043

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-11-10 09:03:04 +01:00
Tiago Medicci Serrano
18718316dc esp32/ble: enable the BLE interrupt during a SPI flash operation
This commit sets the BLE's interrupt as a IRAM-enabled interrupt,
which enables it to run during a SPI flash operation. This enables
us to create a cache to off-load semaphores and message queues
operations and treat them when the SPI flash operation is finished.
By doing that, we avoid packet losses during a SPI flash operation.
2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
f94daf09b2 esp32s3/spiflash: Fix comment and remove unused variable 2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
b25793ebac esp32/spiflash: Make it similar to ESP32-S3 by removing cache state 2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
57b8fc9954 esp32/irq: Allow IRAM ISRs to run during SPI flash operation
This commit provides an interface to register ISRs that run from
IRAM and keeps track of the non-IRAM interrupts. It enables, for
instance, to avoid disabling all the interrupts during a SPI flash
operation: IRAM-enabled ISRs are, then, able to run during these
operations.

It also makes the code look more similar to the ESP32-S3 SPI flash
implementation by creating a common `esp32_spiflash_init` that is
responsible to create the SPI flash operation tasks. The function
intended to initialize the SPI flash partions was, then, renamed to
`board_spiflash_init`.
2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
606190d9b3 esp32/ble: fix saving/restoring the interrupt status flags
Whenever we enter/leave a critical section, the interrupt status is
saved and, then, restored. However, for the ESP32's BLE adapter,
entering/leaving a critical section is done on separate functions
that need to be registered as a callback.

The status flag was being saved as a global variable. However,
calling nested enter_critical_section would overwrite this global
variable that was storing the previous flag and, when leaving the
last critical section, the restored status would be different from
the one expected. The proposed solution for this issue is to create
a global array to store the interrupt status flags for nested calls.
2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
c60d5c2ea1 esp32s3/wireless: Fix typo
The CPU 2 interrupt source (which is not used for anything else) is
used to off-load BLE data after a SPI flash operation.
2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
fae075a749 esp32/ble: Lock the scheduler before creating pinned thread
This ensures that the thread that has been just created doesn't
run before its affinity is set, avoiding it to be scheduled in the
wrong CPU core.
2023-11-10 09:11:35 +08:00
Eren Terzioglu
9997a858e2 xtensa/esp32s2: Add SPI slave support 2023-11-10 00:34:39 +08:00