David Sidrane
32c4bdb7a6
s32k1xx:LPI2C Add DMA support
2022-08-10 11:22:38 +08:00
raiden00pl
08b8234e9e
arch/arm/src/stm32f7: port ADC driver from arch/stm32
...
This change adds support for the following features:
- injected channels (default: 0)
- ADC resolution (default: 12bit)
- ADC low-level operations
- ADC external triggers
- custom ADC interrupts
- ADC sample time configuration
- configurable ADC SCAN mode (default on if DMA)
- configurable ADC DMA mode (default: one shot mode)
- reset the ADC block only if all ADC instances are closed
2022-08-10 02:03:51 +08:00
Ville Juven
60042fea74
risc-v: Implement riscv_sbi_set_timer
...
This implements riscv_sbi_set_timer. This requires the OpenSBI companion
software to work (but this is needed by the kernel mode anyways).
2022-08-10 02:02:39 +08:00
David Sidrane
4ee917c14c
stm32f7:Serial Fix breakage from #6779
2022-08-09 20:18:23 +03:00
Jiuzhu Dong
fe17f747a7
fs/directory: move private directory information to filesystem
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
Jiuzhu Dong
90db4daca9
fs/directory: update readdir interface for all filesystem
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
Jiuzhu Dong
3a70962b7a
fs/directory: use file mode to manage directory
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
Jiuzhu Dong
094e986bbd
fcntl/O_CLOEXEC: add O_CLOEXEC map for hostfs
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
Ville Juven
31bb362aab
risc-v: Fix kernel MMU mapping for L3 table
...
The L3 table address was calculated incorrectly. For every 2MiB of
mapped memory, an offset of 4KiB is needed from the base of the L3
table. The old calculation failed if paddr was not aligned to a 2MiB
boundary.
2022-08-09 23:14:46 +08:00
David Sidrane
2e7b594bf4
s32k1xx:Add s32k146 DMAMUX
2022-08-09 16:29:21 +03:00
David Sidrane
3813320c31
s32k1xx_edma:Add Looping and cleanup
...
s32k1xx:EDMA Use aligned_data macros
s32k1xx:EDMA CONFIG_ARCH_CHIP_S32K14x->CONFIG_ARCH_CHIP_S32K14X
s32k1xx:EDMA remove FAR keyword
s32k1xx:EDMA Fix C&P error from Kinetis
s32k1xx:EDMA TCD Alignment of 32 Bytes to support Scatter/Gather
s32k1xx:EDMA Fix access violation
s32k1xx:dmamux fixed missing closing paren
2022-08-09 16:29:21 +03:00
raiden00pl
a05db5299e
arch/arm/src/stm32f7: port PWM driver from arch/stm32
...
This change adds support for the following features:
1. PWM complementary outputs
2. interface for low-level PWM operations
3. support for all PWM channel modes
4. support for internal PWM channels (TIM1/TIM8)
5. support for PWM channel polarity and IDLE state
6. support for TRGO and BREAK
2022-08-09 12:37:49 +08:00
raiden00pl
fd02855c63
arch/stm32f7: rename PWM complementary output pins from CHxN to CHxNOUT (always output)
2022-08-09 12:37:49 +08:00
David Sidrane
050ce3e0d3
kinetis:spi remove ttype & do cache ops
2022-08-09 10:46:31 +08:00
David Sidrane
22580584d2
kinetis:[lp]serial remove ttype & do cache ops
2022-08-09 10:46:31 +08:00
David Sidrane
7a7a01153b
Kinetis:edma Cleanup
...
Kientis:edma Cleanup
Kinetis:EDMA Interrupt on last TCD
Kintis:edma remove dcache operations on passed data
Data can be chained in TCD and both read and write
can be in the chain. So the dmach ttype is not
relevent for all; the TCDs. Therefor we only perform
dcache operations on internal strutures, The caller
must perform dcache operations on their data.
kinetis:EDMA TCD Alignment of 32 Bytes to support Scatter/Gather
2022-08-09 10:46:31 +08:00
Nathan Hartman
dd718e78f7
Fix typos
2022-08-07 23:33:19 +08:00
p-eaglelaw
631ae0032e
fix warning
2022-08-07 13:03:39 +08:00
p-eaglelaw
702e2f3680
remove unused lib,fix according review comments
2022-08-07 01:57:02 +08:00
David Sidrane
55aaba53fc
imxrt:SPI add DMA support
2022-08-06 15:32:07 +08:00
David Sidrane
fa58381e58
imxrt:serial add TX & RX DMA support
...
imxrt:serial ioctl should call to proper setup
2022-08-06 15:32:07 +08:00
David Sidrane
85ec2e1446
imxrt:Add LPI2C DMA
2022-08-06 15:32:07 +08:00
David Sidrane
f34acdb936
imxrt:lpi2c add parens for macros expansions
2022-08-06 15:32:07 +08:00
Peter van der Perk
22d41f6b9c
LPC17xx_40xx PWM multichannel support
...
USB no softconnect
SocketCAN kconfig fixes
2022-08-06 15:31:38 +08:00
David Sidrane
6ab76bfc7c
imrt105x:ENET Match Data sheet Naming
2022-08-06 15:31:23 +08:00
David Sidrane
b9a6b01e6c
imrt102x:ENET Match Data sheet Naming
2022-08-06 15:31:23 +08:00
David Sidrane
0628019c2c
imxrt:Enet ensure proper dcache for Writeback mode
...
Use aligned_data
added proper handeling for Writeback
2022-08-06 15:31:23 +08:00
David Sidrane
522a949ed5
imxrt:enet Better interrupt state handeling
2022-08-06 15:31:23 +08:00
David Sidrane
1d88f8df37
imxrt:pinmux ENET2 correct ALT for GPIO_ENET2_REF_CLK2
2022-08-06 15:31:23 +08:00
David Sidrane
bced1a3cb4
imxrt:Fix Ethernet Clocking
2022-08-06 15:31:23 +08:00
David Sidrane
6a2c1fb1de
imxrt:Kconfig add IMXRT_PHY_POLLING
2022-08-06 15:31:23 +08:00
David Sidrane
81f03a9151
imxrt:ETH Add Support for ETH2
2022-08-06 15:31:23 +08:00
David Sidrane
49d304257c
imxrt:All boards ARCH_PHY_INTERRUPT is a board property
2022-08-06 15:31:23 +08:00
David Sidrane
3af910f8b6
imxrt:Ethernet Add LAN8742A support
2022-08-06 15:31:23 +08:00
Petro Karashchenko
b3cd9090d1
drivers/net: make sure that net driver d_buf is 16-bit aligned
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-08-05 22:21:37 +08:00
raiden00pl
93584f8668
arch/stm32f0l0g0: add SPI3 support (STM32G0B0 chips)
2022-08-05 13:57:56 +08:00
Xiang Xiao
c61381da56
arch/risc-v: Fix error: invalid application of 'sizeof' to incomplete type 'struct tls_info_s'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-05 08:45:11 +03:00
David Sidrane
33efeeeafd
imxrt:EDMA add loop support
...
imxrt:edma imxrt_dmach_{xfrsetup|getcount} DMACH_HANDLE *->DMACH_HANDLE
imxrt:EDMA TCD Alignment of 32 Bytes to support Scatter/Gather
2022-08-05 09:44:36 +08:00
David Sidrane
1421bc58db
imxrt:Correct register usage in up_rtc_settime
2022-08-05 09:43:36 +08:00
David Sidrane
5e902861d9
imxrt:usdhc fix error when CONFIG_ARMV7M_DCACHE is off
2022-08-05 09:43:36 +08:00
David Sidrane
b9c6284750
imxrt:lowputc add extern "C"
2022-08-05 09:43:36 +08:00
Nathan Hartman
20bdd44e7b
Remove executable permission from source and build files.
2022-08-04 12:48:18 -03:00
Xiang Xiao
8582a12388
drivers: Reorganize the power related code layout
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-04 10:28:28 +03:00
Masayuki Ishikawa
8e7752c7da
arch: common: Fix up_check_tcbstack() for CONFIG_ARCH_ADDRENV=y
...
Summary:
- I noticed that ps shows incorrect stack usage when running
getprime in the background.
- With CONFIG_ARCH_ADDRENV=y, a user task including pthread
allocates its stack in the user space that needs to be
accessed with a correct address environment.
- This commit fixes this issue.
Impact:
- CONFIG_ARCH_ADDRENV=y only
Testing:
- Tested with sabre-6quad:knsh on qemu-6.2
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-04 11:13:16 +08:00
Eero Nurkkala
e0291b1ce8
risc-v/mpfs: usb: configure fifos properly
...
RX_FIFO_ADDRs and TX_FIFO_ADDR were misconfigured. These addresses
overlapped causing data corruption during high USB loads. For
example, data corruption was present during the following conditions:
1. Composite USB driver was used (CDC/ACM + Mass storage)
2. /dev/ttyACM0 was accessed instantly from Linux side when
starting up.
3. Training data was sent to /dev/ttyACM0 from NuttX from the
very beginning periodically.
It was observed that while Mass storage was negotiating, sometimes
data sent from NuttX to Linux via CDC/ACM was corrupt, although it
was sent properly on the TX fifo.
Also, don't access TXCSRL_REG_EPN_TX_FIFO_NE_MASK for EP0 as it's
not applicable.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-08-03 23:44:12 +08:00
raiden00pl
981ad9fc1e
arch/stm32xx/Kconfig: simplify PWM options and unify them among stm32 chips
2022-08-03 23:43:19 +08:00
raiden00pl
935f110438
arch/stm32f7/stm32_tim.c: include the missing RCC header
2022-08-03 23:42:52 +08:00
raiden00pl
47dbad0a8b
arch/stm32/stm32_foc.c: fix some ADC and PWM ifdefs
2022-08-03 23:42:37 +08:00
Peter van der Perk
a6da6dcec6
LPC17_40 CAN driver SocketCAN support
2022-08-03 17:58:57 +08:00
chao.an
d501e01eef
arm/backtrace: use sp unwind if FRAME_POINTER is enabled on thumb mode
...
GCC toolchain Bug 92172 - ARM Thumb2 frame pointers inconsistent with clang
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92172
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-03 17:58:36 +08:00
Peter Bee
f20cd0295f
arch: fix typo
...
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-08-03 17:37:08 +08:00
ligd
8c1fd1df81
rptun: update rptun to openamp 2022.04.0
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-08-03 01:22:53 +08:00
Daniel P. Carvalho
40e6c8dca4
STM32L4 DAC: Added basic support for low level operations
2022-08-02 10:43:59 +08:00
Jari van Ewijk
a554b9ce89
NXP S32K1XX: fix LPI2C reset
2022-08-01 07:34:03 -04:00
Xiang Xiao
c26bb35843
Remove the private NULL, TRUE and FALSE macros
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-31 22:12:57 +03:00
Sergey Nikitenko
ec59125ad3
stm32wb/mbox: fixing ACL transmit buffer
2022-07-31 10:29:29 +08:00
Sergey Nikitenko
30a80a390d
stm32wb/ble: disable default CPU2 host config option
2022-07-31 10:29:29 +08:00
Sergey Nikitenko
9db4caca1d
stm32wb/nimble: workaround for unsupported HCI command
2022-07-31 10:29:29 +08:00
Sergey Nikitenko
cf594b2c81
stm32wb/mbox: renaming msg_buf->cmd_buf
2022-07-30 11:45:15 +08:00
Sergey Nikitenko
49af13c507
stm32wb/mbox: fixing txbuf queue
2022-07-30 11:45:15 +08:00
Michał Łyszczek
e887a4a5b7
stm32wl5: add lower half driver for IPCC
...
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-07-29 23:11:32 +08:00
chao.an
0d28168679
arm/allocateheap: fix multiple definition of 'up_allocate_heap'
...
ld: arch/libarch.a(cxd56_allocateheap.c.obj): in function `up_allocate_heap':
arch/arm/src/cxd56xx/cxd56_allocateheap.c:113: multiple definition of `up_allocate_heap'; arch/libarch.a(arm_allocateheap.c.obj):
arch/arm/src/common/arm_allocateheap.c:110: first defined here
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-07-29 11:57:10 +03:00
chao.an
93f719bccb
arm/hostfs: fix build warning
...
arch/arm/src/common/arm_hostfs.c: In function 'host_read':
arch/arm/src/common/arm_hostfs.c:156:24:
warning: passing argument 1 of 'up_invalidate_dcache' makes integer from pointer without a cast [-Wint-conversion]
156 | up_invalidate_dcache(buf, buf + count);
| ^~~
| |
| void *
In file included from arch/arm/src/common/arm_hostfs.c:26:
include/nuttx/cache.h:261:37: note: expected 'uintptr_t' {aka 'unsigned int'} but argument is of type 'void *'
261 | void up_invalidate_dcache(uintptr_t start, uintptr_t end);
| ~~~~~~~~~~^~~~~
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-07-29 08:52:59 +03:00
zhuyanlin
031c89db89
power: add PM_IDLE_DOMAIN to pm.h and remove definations
...
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-07-29 11:15:40 +08:00
Xiang Xiao
13a7ae3d06
arch: Call board_reset before up_irq_save and spin_trylock
...
since board_reset may call some kernel functions which try
to acquire the lock again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-28 08:18:24 -04:00
raiden00pl
cce7b7ada6
stm32f7: add showprogress in __start
2022-07-28 20:07:31 +08:00
Sergey Nikitenko
82ad4b0e08
stm32wb: adding BLE support
2022-07-28 15:23:34 +08:00
Sergey Nikitenko
9db6aaa5c7
stm32wb: fixing IPCC 'putreg' calls
2022-07-28 15:23:34 +08:00
Masayuki Ishikawa
1742b7f6a4
arch: risc-v: Fix warnings in common/crt0.c
...
Summary:
- This commit fixes warnings in common/crt0.c
Impact:
- None
Testing:
- Build only
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-27 23:22:23 +08:00
Jiuzhu Dong
9d4549d48b
arch: limit output maximum size stackdump when sp is not within stack
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-27 20:48:33 +08:00
Jiuzhu Dong
136b1d6d42
arch: using remain to ignore invalid stack content when sp is not within stack
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-27 20:48:33 +08:00
Jiuzhu Dong
0ca02a5564
arch/xtensa: optimize stackdump
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-27 20:48:33 +08:00
Jiuzhu Dong
91d8ed319e
arch/riscv: optimize stackdump
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-27 20:48:33 +08:00
Jiuzhu Dong
5c8fd46126
arch/stack: rename do_stack_check with arch prefix
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-27 20:48:33 +08:00
Jiuzhu Dong
79597d0caf
arch/up_stack_check: using running_task to get correct task context
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-27 20:48:33 +08:00
ligd
8a3683fb9f
rptun: add ns_match callback to resolve rptun deadlock
...
thread A: accept -> net_lock -> socket_rpmsg_accept
-> rpmsg_register_callabck -> rptun_lock
thread B: ns_bind -> rpmsg_socket_ns_bind -> get_tx_payload_buffer
-> rptun_wait_tx -> usrsock_rpmsg_ept_cb -> usrsockdev_write
-> net_lock -> deadlock
fix:
add ns_match callback
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-27 20:36:51 +08:00
Peter van der Perk
9e7e45df76
Evaluate n in preprocessor before masking
2022-07-25 23:47:05 +08:00
Peter van der Perk
ec118743ea
NX style fixes
2022-07-25 23:47:05 +08:00
Peter van der Perk
eae3f77673
Fix wrong comment style
2022-07-25 23:47:05 +08:00
Peter van der Perk
b3590f00b3
NXStyle and preprocessor fixes
...
Co-authored-by: Jari van Ewijk <jari.vanewijk@nxp.com>
2022-07-25 23:47:05 +08:00
Jari van Ewijk
dd1096695d
Add initial support for NXP S32K3 MCU family
...
Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
2022-07-25 23:47:05 +08:00
raiden00pl
8eae3bb5ff
stm32f0l0g0/stm32_spi.c: fix receiving data for half duplex mode
2022-07-25 23:46:33 +08:00
raiden00pl
351c9dc837
stm32f0l0g0/stm32_spi.c: remove unused spi_readbyte function
2022-07-25 23:46:33 +08:00
raiden00pl
af4d65416a
stm32f0l0g0/stm32_spi.c: add missing SPI mode config and fix ifdef
2022-07-25 23:46:33 +08:00
raiden00pl
69986fad84
stm32f0l0g0/hardware/stm32_spi.h: remove unused definitions
2022-07-25 23:46:33 +08:00
raiden00pl
92b676479a
stm32l4/Kconfig: add support for STM32L476JG and STM32L476JE
2022-07-23 16:51:31 -03:00
curuvar
c21c7ac8dc
Added Adafruit QT Py RP2040 board.
...
Added ability to configure indivdual UART, SPI and I2C pin location.
2022-07-23 18:25:38 +08:00
curuvar
421b8ae3e7
Ability to use newer pico-sdk with RP2040 builds (Issue #4919 )
2022-07-23 14:36:52 +08:00
Fotis Panagiotopoulos
ad7f503cfa
sim: Increased priority of loop task.
2022-07-23 00:22:35 +08:00
Jouni Ukkonen
e268b23142
OpenSBI: Add configurable support for domain init
...
Initialize .domains_init function entry point in sbi_platform_operations when
CONFIG_OPENSBI_DOMAINS=y. In this case, the board specific code must provide
the "board_domains_init" function.
Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2022-07-22 19:00:33 +03:00
ligd
8f54f9e1c3
sim: idle pm should do PM_RESOTRE in critical section
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 09:06:38 +03:00
Fotis Panagiotopoulos
30f8d33bca
Fixed path calculation in BBS RAM.
2022-07-22 10:59:57 +08:00
ligd
df365008b2
arm_secure_irq: fix NVIC_IRQ_DBGMONITOR un-secure set failed
...
NVIC_DEMCR.SDME is a read-only bit
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 01:48:55 +03:00
Petro Karashchenko
2291f601ee
arch/arm/samv7: fix SPI 16-bit transactions in DMA mode
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-07-21 23:26:20 +08:00
Abdelatif Guettouche
ae1cbc47ef
esp32&c3/Kconfig: CONFIG_ESP32(C3)_WIRELESS doesn't need to be user
...
selectable.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-07-20 22:02:28 +03:00
Abdelatif Guettouche
20c6996e81
esp32c3/Kconfig: Don't select options already selected.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-07-20 22:02:28 +03:00
Abdelatif Guettouche
4ccedb176e
arch/esp32: Re-organise shared functions and options for ESP32 Wireless code
...
- Introduce the ESP32_WIFI option to replace the broader
ESP32_WIRELESS option. ESP32_WIRELESS is used by both WIFI and BLE.
- Move common functions from esp32_wifi_adapter to esp32_wireless.
- Change the order of including the external libraries to avoid undefined references.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-07-20 22:02:28 +03:00
Abdelatif Guettouche
770147ffe3
arch/esp32: Introduce the ESP32_RTC option.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-07-20 22:01:25 +03:00
Masayuki Ishikawa
06b158a490
arch: arm64: Fix warnings in arm64_cpstart.c
...
Summary:
- Fix warnings in arm64_cpstart.c if CONFIG_DEBUG_INFO=n
Impact:
- None
Testing:
- Tested with qemu-a53:nsh_smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-19 10:49:32 +08:00
Xiang Xiao
2166c98809
Add printflike and scanflike to all printf/scanf like functions
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-18 14:14:36 +03:00