Commit Graph

15638 Commits

Author SHA1 Message Date
raiden00pl
95ac627d59 arch/nrf{52|53|91}: add missing support for 1 Mbps UART baud 2023-12-02 19:40:09 -08:00
chao an
88dd492e4d arm/clang: clang must depends on the implementation of the math library
Since picolibc used by clang-17 does not provide an implementation of libm,
if you want to use clang, please must specify a libm as an option.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-29 03:58:05 -08:00
chao an
0bf9e5eb8d armv6-m/dumpnvic: fix build warning
armv6-m/arm_dumpnvic.c: In function 'arm_dumpnvic':
armv6-m/arm_dumpnvic.c:67:13: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
   67 |       _info("   IPR%d: %08x  IPR%d: %08x  IPR%d: %08x  IPR%d: %08x\n",
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
armv6-m/arm_dumpnvic.c:67:27: note: format string is defined here
   67 |       _info("   IPR%d: %08x  IPR%d: %08x  IPR%d: %08x  IPR%d: %08x\n",
      |                        ~~~^
      |                           |
      |                           unsigned int
      |                        %08lx

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-29 03:58:05 -08:00
chao an
27bfdf68ae stm32/ethernet: fix build warning
chip/stm32_ethernet.c:2014:7: warning: variable 'i' set but not used [-Wunused-but-set-variable]
 2014 |   int i;
      |       ^
1 warning generated.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-29 03:58:05 -08:00
chao an
1ce1a19afd arm/clang: replace deprecated parameter
In LLVM Clang 17.0.1, the `--config` parameter has been deprecated and replaced by the `-target` parameter

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-29 03:58:05 -08:00
yaojingwei
a57e3f365a video.c: modify set_buf call seqence in start_capture function.
To avoid losing the first frame, the set_buf needs to excute first. At the same time, imgdata->start_capture should excuted before the imgsensor->start_capture.

Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2023-11-29 02:01:34 -08:00
chao an
e560111dbb tiva/sock_can: correct mutex lock cycle
Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-22 01:57:44 -08:00
anjiahao
749655d785 tcbinfo:remove total_num form tcbinfo.
total_num is not required
test:

make -f tools/Makefile.host
cp tools/jlink-nuttx /opt/SEGGER/JLink_V786a/libnuttxplugin.so
JLinkGDBServer -if SWD -speed 5000 -device STM32F429ZI -NoGui 1 -rtos libnuttxplugin

can run normally

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-11-21 21:52:24 -08:00
hujun5
1a65f5ed88 sched_lock refine: remove sched_[un]lock in xxx_waitsample
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-11-21 20:03:43 -08:00
Xiang Xiao
eddd90de78 poll: pollsetup should notify only one fd passd by caller
since it's redundant to iterate the whole fds array in setup

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-21 09:07:17 +01:00
bertrand
f5374e71f3 Fix compilation and fix SAM_DMAC_CHINTENCLR settings 2023-11-18 18:39:30 -03:00
Petteri Aimonen
2cf56e0fb3 stm32: Add support for Ethernet packet timestamping and PTP timer
Adds support for hardware timestamping of received Ethernet packets.
The timestamp is available to applications using socket option SO_TIMESTAMP.

Optionally, the Ethernet PTP timer can be used as system high-resolution RTC.
In this mode it supports fine resolution rate adjustment.

Alternatively other time source for CLOCK_REALTIME can be used, and the
PTP timestamps are converted by sampling the clocks and computing the
difference. This results in a few microseconds of uncertainty.
2023-11-18 03:10:45 -08:00
raiden00pl
42211cc1c3 nrf91: initial support for GNSS (GPS only for now) 2023-11-16 20:32:41 -08:00
raiden00pl
d38bf3ff2d nrf91/nrf91_modem.c: configure system mode 2023-11-16 20:32:41 -08:00
raiden00pl
18cf6aef16 nrf91/nrf91_modem.c: add support for board-specific modem configuration
this can be used to configure an antenna that is specific to a given board
2023-11-16 20:32:41 -08:00
raiden00pl
4b6213adef nrf91/nrf91_modem_sock.c: fix printf warnings 2023-11-16 20:32:41 -08:00
Xiang Xiao
5ca3e805b2 arch/imx6: Replace cpu_start_t with start_t
avoid the unnecessary typedef

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-16 14:35:48 +09:00
chao an
64cf63475c arch/dumponexit: unify dump on exit to common code
remove arch implement and move to common code

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-15 08:28:25 -08:00
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
Petteri Aimonen
6dabcd567e stm32/samv7: Update SysTick drivers to new up_adjtime() API. 2023-11-14 19:47:40 -08:00
raiden00pl
7d99f01cf7 drivers/foc: get hardware information via lower-half interface 2023-11-14 04:34:49 -08: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
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
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
Janne Rosberg
03064b9701 sama5: add support for QSPI 2023-11-08 21:58:02 +01:00
Janne Rosberg
0f5cea7322 sama5/sam_dmac: add define for DMACH_FLAG_PERIPHISMEMORY 2023-11-08 21:58:02 +01:00
Niklas Hauser
660ac63b92 stm32h7/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 and the
STM32F7 TXDMA . 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-08 12:52:30 -05:00
simbit18
8fa6a29503 Fix Kconfig style
Remove extra TABs
Remove spaces from Kconfig
Add comments
2023-11-08 22:58:26 +08:00
zhanghongyu
fbd0b3d1d7 cmake: move NUTTX_CHIP_ABS_DIR before common src
Some APIs are implemented both in common code and CHIP-specific code,
and the link needs to be based on the implementation in CHIP, so move
NUTTX_CHIP_ABS_DIR before common src.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-11-07 17:39:03 +01:00
raiden00pl
24c7e355d9 arch/stm32: remove unused STM32_UART_RXDMA and STM32_UART_TXDMA flags
These flags are not used in the code.
SERIAL_HAVE_RXDMA and SERIAL_HAVE_TXDMA flags are used instead.

STM32_UART_TXDMA flag is not even defined in Kconfig
2023-11-03 22:24:31 +08:00
raiden00pl
3220a59a3e arch/stm32: STM32_FOC_G4_ADCCHAN0_WORKAROUND depend on STM32G4 2023-11-03 22:24:31 +08:00
SPRESENSE
2f5bb9200a arch: cxd56xx: Support to get gnss firmware version
Support to get gnss firmware version and fix typo.
2023-11-03 09:23:57 +01:00
David Sidrane
e0c883f487 s32k3xxx:serial ensure the cache is updated if the DMA has updated again 2023-11-01 09:24:57 +08:00
Gabriel de Sousa
0bc897df15 FIX: s32kxxx flexcan doesn't set srr bit for extended frames 2023-10-31 12:22:00 -03:00
SPRESENSE
ed5785ad06 arch: cxd56xx: Update gnss header files
- Add some ioctl commands to get version, sleep, wakeup and reset.
- Add new data structures for CXD5610 GNSS Add-on board.
2023-10-31 09:18:18 +01:00
raiden00pl
5b87fdfb9d Documentation: remove all migrated READMEs 2023-10-29 21:03:54 -03:00
TimJTi
bfa14406d6 SAMA5D2 add new mcan ioctls 2023-10-28 15:21:46 +08:00
SPRESENSE
f3fabc5d32 Revert "make/archive: Use the full path name when matching or storing names in the archive"
This reverts commit 563125fde3.
2023-10-27 22:26:18 +08:00
David Sidrane
881d67272c s32k3xx:Serial overcome race where DMA has not fetched TCD again"
With TCD set to loop, there is a window where the
   DMA has raised Done, but not reloaded the TCD, resetting
   count and clearing Done.

   In this window  imxrt_dmach_getcount could then return 0.
   Resulting in imxrt_dma_nextrx returning RXDMA_BUFFER_SIZE.
   Which is not a valid index in the FIFO.

   Since the count will be set to RXDMA_BUFFER_SIZE. When the DMA
   engine completes the TCD reload. The imxrt_dma_nextrx would
   return 0. Therefore:

    (RXDMA_BUFFER_SIZE - dmaresidual) % RXDMA_BUFFER_SIZE

   accomplishes this.
2023-10-27 22:24:27 +08:00
David Sidrane
8b9d05d0f7 s32k1xx:Serial overcome race where DMA has not fetched TCD again"
With TCD set to loop, there is a window where the
   DMA has raised Done, but not reloaded the TCD, resetting
   count and clearing Done.

   In this window  imxrt_dmach_getcount could then return 0.
   Resulting in imxrt_dma_nextrx returning RXDMA_BUFFER_SIZE.
   Which is not a valid index in the FIFO.

   Since the count will be set to RXDMA_BUFFER_SIZE. When the DMA
   engine completes the TCD reload. The imxrt_dma_nextrx would
   return 0. Therefore:

    (RXDMA_BUFFER_SIZE - dmaresidual) % RXDMA_BUFFER_SIZE

   accomplishes this.
2023-10-27 22:24:27 +08:00
David Sidrane
892fe45900 imxrt:Serial overcome race where DMA has not fetched TCD again"
With TCD set to loop, there is a window where the
   DMA has raised Done, but not reloaded the TCD, resetting
   count and clearing Done.

   In this window  imxrt_dmach_getcount could then return 0.
   Resulting in imxrt_dma_nextrx returning RXDMA_BUFFER_SIZE.
   Which is not a valid index in the FIFO.

   Since the count will be set to RXDMA_BUFFER_SIZE. When the DMA
   engine completes the TCD reload. The imxrt_dma_nextrx would
   return 0. Therefore:

    (RXDMA_BUFFER_SIZE - dmaresidual) % RXDMA_BUFFER_SIZE

   accomplishes this.
2023-10-27 22:24:27 +08:00
Robert Middleton
c50d47136c Fix #11005 2023-10-27 11:44:44 +08:00
simbit18
37729540c0 Fix Kconfig style
Remove spaces from Kconfig
Add comments
2023-10-26 01:53:58 +08:00
simbit18
fa7d0bbd45 Fix nuttx coding style
Remove TABs
2023-10-26 01:53:48 +08:00
David Sidrane
def7a34733 s32k1xx:lpi2c DMA transaction only need the status conditioned
With DMA enabled on some I2C channels but not all
   the Non DMA channels were failing.

   The cause was condition the status with only the enabled
   interrupts on non DMA chennels. This conditioning needs
   to only happen in DMA enabled channels
2023-10-25 17:22:47 +03:00