Commit Graph

16442 Commits

Author SHA1 Message Date
YAMAMOTO Takashi
b380760eb1 arch/arm/src/imx6/imx_serial.c: Appease nxstyle 2020-11-16 05:46:53 -08:00
YAMAMOTO Takashi
99c9a671d2 arch/arm/src/samd2l2/sam_start.c: Appease nxstyle 2020-11-16 05:46:53 -08:00
YAMAMOTO Takashi
23da936a38 arch/arm/src/nuc1xx/nuc_start.c: Appease nxstyle 2020-11-16 05:46:53 -08:00
YAMAMOTO Takashi
516d51d4d1 arch/arm/src/nrf52/nrf52_allocateheap.c: Appease nxstyle 2020-11-16 05:46:53 -08:00
YAMAMOTO Takashi
d007b37973 arch/arm/src/max326xx/common/max326_start.c: Appease nxstyle 2020-11-16 05:46:53 -08:00
YAMAMOTO Takashi
a86c58334c arch/arm/src/lpc54xx/lpc54_allocateheap.c: Appease nxstyle 2020-11-16 05:46:53 -08:00
YAMAMOTO Takashi
fd48419a3d arch/arm/src/kl/kl_start.c: Appease nxstyle 2020-11-16 05:46:53 -08:00
YAMAMOTO Takashi
b0e6462f6a arch/arm/src/lpc43xx/lpc43_allocateheap.c: Appease nxstyle 2020-11-16 05:46:53 -08:00
YAMAMOTO Takashi
cc2384ad8e z8: Appease nxstyle 2020-11-16 05:46:53 -08:00
YAMAMOTO Takashi
ba02387d68 hc12: Appease nxstyle 2020-11-16 05:46:53 -08:00
YAMAMOTO Takashi
638f31a42f hcs12: Appease nxstyle 2020-11-16 05:46:53 -08:00
Masayuki Ishikawa
13f3f84bae arch: armv7-a: Remove unnecessary d-cache operation in arm_cpustart.c
Summary:
- Remove unnecessary d-cache operation to make boot fast

Impact:
- armv7-a SMP only

Testing:
- Tested with sabre-6quad:smp (QEMU and dev board)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-16 00:53:17 -08:00
Masayuki Ishikawa
ad81db2272 arch: armv7-a: Fix arm_l2cc_pl310.c with DEBUGASSERT()
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-16 00:53:17 -08:00
Masayuki Ishikawa
649337b077 arch: imx6: Add arm_l2cc_pl310.c to Make.defs
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-16 00:53:17 -08:00
Masayuki Ishikawa
ab758664ed arch: imx6: Fix compile errors in chip.h
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>>
2020-11-16 00:53:17 -08:00
Masayuki Ishikawa
a813d27f5f arch: armv7-a: Fix comile errors in l2cc_pl310.h
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-16 00:53:17 -08:00
Masayuki Ishikawa
c52d83abc2 arch: armv7-a: Fix compile errors in arm_l2cc_pl310.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-16 00:53:17 -08:00
Masayuki Ishikawa
2039e2a565 arch: armv7-a: Fix style warnings in l2cc_pl310.h
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-16 00:53:17 -08:00
Masayuki Ishikawa
94b43b93e5 arch: armv7-a: Fix style warnings in arm_l2cc_pl310.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-16 00:53:17 -08:00
Nathan Hartman
08979d6e1a stm32/stm32_bbsram.c: Fix nxstyle errors
arch/arm/src/stm32/stm32_bbsram.h:

    * Fix nxstyle errors.
2020-11-15 20:42:55 +01:00
Masayuki Ishikawa
a20463642e arch: armv7-a: Fix MMU settings for SDRAM in SMP mode
Summary:
- This commit fixes armv7-a deadlocks with D-cache in SMP mode.
- In SMP mode, MMU for SDRAM area must be set to shareable

Impact:
- SMP only

Testing:
- Tested with sabre-6quad:smp (QEMU and dev board)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-14 16:40:01 -08:00
Masayuki Ishikawa
812257d058 arch: armv7-a: Fix style warnings in mmu.h
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-14 16:40:01 -08:00
Bernd Walter
0cf66149ed twi_takesem() had been changed to return an int.
Neither the prototype, nor the description had been adapted, resulting in
compiler errors.
Fix both points.
2020-11-14 19:17:14 +01:00
Nathan Hartman
1aac3d7e57 stm32/stm32_aes.c: Fix nxstyle errors
arch/arm/src/stm32/stm32_aes.c:

    * Fix nxstyle errors.
2020-11-13 16:13:58 -08:00
Sara Souza
e6b6f06d22 xtensa/esp32: added support to automonitor by capture 2020-11-13 13:01:40 -03:00
Dong Heng
bfb5214ef8 xtensa/esp32: Add SPI Flash hardware encryption I/O support 2020-11-13 08:37:59 +01:00
Nathan Hartman
4977522ead stm32: Add DMAMUX register mappings and request IDs
arch/arm/src/stm32/hardware/stm32_dmamux.h,
arch/arm/src/stm32/hardware/stm32g47xxx_dmamux.h:

    * New files, based on STM32G474RE reference manual, RM0440 Rev 4.
2020-11-13 08:09:10 +01:00
Nathan Hartman
35126b31b7 stm32f0l0g0/stm32_dmamux.h: Fix errors in bitfield definitions
Used reference manual for STM32G071CB. The F0 and L0 families do not
appear to have a DMAMUX.

arch/arm/src/stm32f0l0g0/hardware/stm32_dmamux.h:

    * Remove all mentions of DMAMUX12 from comments. This family has
      at most DMAMUX1 only.

    * Add missing defines DMAMUX_CCR_SPOL_NONE,
      DMAMUX_CCR_SPOL_RISING, DMAMUX_CCR_SPOL_FALLING, and
      DMAMUX_CCR_SPOL_BOTH.

    * DMAMUX_CCR_SYNCID_SHIFT: Fix comment. Was "Bits 24-26" (3 bits)
      but datasheet shows bits 24-28 (5 bits).

    * DMAMUX_CCR_SYNCID_MASK: Fix mask. Was 0x7 (3 bits) but datasheet
      shows (5 bits) 0x1f.

    * DMAMUX1_CSR_SOF(x): Add parenthesis around macro parameter
      expansion.

    * DMAMUX1_CFR_SOF(x): Rename to DMAMUX1_CFR_CSOF(x) for
      consistency with datasheet and add parenthesis around macro
      parameter expansion.

    * DMAMUX_RGCR_GPOL_MASK: Fix incorrect mask. Was 0x7 (3 bits) but
      datasheet shows only 2 bits (0x3).

    * Add missing defines DMAMUX_RGCR_GPOL_NONE,
      DMAMUX_RGCR_GPOL_RISING, DMAMUX_RGCR_GPOL_FALLING, and
      DMAMUX_RGCR_GPOL_BOTH.

    * DMAMUX_RGCR_GNBREQ_SHIFT: Fix incorrect value. Was 17 (collision
      with DMAMUX_RGCR_GPOL_SHIFT) but datasheet and comment both show
      this bitfield at bits 19-23.

    * DMAMUX_RGCR_GNBREQL_MASK: Fix incorrect mask. Was 0x7 (3 bits)
      but datasheet shows 5 bits (0x1f).

    * DMAMUX1_RGSR_SOF(x): Rename to DMAMUX1_RGSR_OF(x) for
      consistency with datasheet and add parenthesis around macro
      parameter expansion.

    * DMAMUX1_RGCFR_SOF(x): Rename to DMAMUX1_RGCFR_COF(x) for
      consistency with datasheet and add parenthesis around macro
      parameter expansion.

    * DMAMAP_MAP(d,c): Add parenthesis around macro parameter
      expansion.

    * Fix nxstyle errors.
2020-11-12 23:07:37 -08:00
Nathan Hartman
fd020fa0ae stm32h7/stm32_dmamux.h: Add missing CCR SPOL defines
arch/arm/src/stm32h7/hardware/stm32_dmamux.h:

    * Add missing defines DMAMUX_CCR_SPOL_NONE,
      DMAMUX_CCR_SPOL_RISING, DMAMUX_CCR_SPOL_FALLING, and
      DMAMUX_CCR_SPOL_BOTH.

    * Fix nxstyle errors.
2020-11-13 08:03:02 +01:00
Nathan Hartman
87bfa24c8c stm32/stm32_spi: Add SPI register definitions for STM32G47XX
arch/arm/src/stm32/hardware/stm32_spi.h:

    * Avoid numerous ifdef on STM32 part numbers and make the
      different variations of SPI peripheral features more
      self-documenting: based on STM32_HAVE_IP_SPI_V* defines
      from chip.h, define some or all of HAVE_SPI_I2S,
      HAVE_SPI_TI_MODE, HAVE_SPI_ARB_DATA_SIZE, HAVE_SPI_FIFOS,
      HAVE_SPI_NSSP, HAVE_SPI_I2S_ASTRT, and make decisions on
      which registers and bitfields to define based on them.

    * Define registers and bitfields for STM32_HAVE_IP_SPI_V4,
      currently used only for STM32G47XX family MCUs, including
      SPI_CR1_CRCL, SPI_CR2_NSSP, SPI_CR2_FRXTH, SPI_CR2_LDMARX,
      SPI_CR2_LDMATX, SPI_CR2_DS_SHIFT/SPI_CR2_DS_MASK,
      SPI_SR_FRLVL_SHIFT/SPI_SR_FRLVL_MASK, and
      SPI_I2SCFGR_ASTRTEN.

    * SPI_I2SCFGR_I2SSTD_PHILLIPS: Was defined incorrectly as
      (xx << SPI_I2SCFGR_I2SSTD_SHIFT). Corrected this to
      (0 << SPI_I2SCFGR_I2SSTD_SHIFT).

    * SPI_I2SCFGR_I2SSTD_MSB: Was defined incorrectly as
      (0 << SPI_I2SCFGR_I2SSTD_SHIFT). Corrected this to
      (1 << SPI_I2SCFGR_I2SSTD_SHIFT).

    * Fix nxstyle errors.

arch/arm/include/stm32/chip.h:

    * Add new section "Peripheral IP versions" and specify version of
      SPI IP block for STM32F10XX, STM32F20XX, STM32F30XX, STM32F33XX,
      STM32F37XX, STM32F4XXX, STM32G47XX, and STM32L15XX.
2020-11-12 04:37:32 -08:00
Nathan Hartman
b63c0863b2 stm32h7/stm32_dmamux.h: Fix errors in bitfield definitions
arch/arm/src/stm32h7/hardware/stm32_dmamux.h:

    * DMAMUX1_CSR_SOF(x): Add parenthesis around macro parameter
      expansion.

    * DMAMUX1_CFR_SOF(x): Rename to DMAMUX1_CFR_CSOF(x) for
      consistency with datasheet and add parenthesis around macro
      parameter expansion.

    * DMAMUX_RGCR_GPOL_MASK: Fix incorrect mask. Was 7 (3 bits) but
      datasheet shows only 2 bits.

    * Add missing defines DMAMUX_RGCR_GPOL_NONE,
      DMAMUX_RGCR_GPOL_RISING, DMAMUX_RGCR_GPOL_FALLING, and
      DMAMUX_RGCR_GPOL_BOTH.

    * DMAMUX_RGCR_GNBREQ_SHIFT: Fix incorrect value. Was 17 (collision
      with DMAMUX_RGCR_GPOL_SHIFT) but datasheet and comment both show
      this bitfield at bits 19-23.

    * DMAMUX_RGCR_GNBREQL_MASK: Fix incorrect mask. Was 7 (3 bits) but
      datasheet shows 5 bits.

    * DMAMUX1_RGSR_SOF(x): Rename to DMAMUX1_RGSR_OF(x) for
      consistency with datasheet and add parenthesis around macro
      parameter expansion.

    * DMAMUX1_RGCFR_SOF(x): Rename to DMAMUX1_RGCFR_COF(x) for
      consistency with datasheet and add parenthesis around macro
      parameter expansion.

    * DMAMAP_MAP(d,c): Add parenthesis around macro parameter
      expansion.
2020-11-12 08:04:23 +01:00
Matias N
13619ea0df nrf52: add SPI PM support (disable/enable SPI peripheral on sleep) 2020-11-12 08:01:25 +01:00
Matias N
a806ca9577 nrf52 SPI: rework support for undefined MOSI/MISO; add support for list DMA mode 2020-11-12 08:01:25 +01:00
Matias N
18be4198e1 Revert "nrf52_spi: support not defining MISO/MOSI pins"
This reverts commit e91a806ab6.
2020-11-12 08:01:25 +01:00
YAMAMOTO Takashi
c79bda6e4f sim inttypes.h: Remove PRI/SCN macros for fast and least types
I forgot to remove some of them
in https://github.com/apache/incubator-nuttx/pull/2227 .
This commit removes them.
2020-11-10 00:03:35 -08:00
Matias N
f55a2879ca nrf52 GPIO/GPIOTE: better expose pin interrupt capability
This change improves upon current support for pin interrupts. Before,
a pin interrupt was handled (with nrf52_gpiote_setevent) using one
of the eight available GPIOTE channels. Moreover, it didn't event let
the user specify which channel to use (simply tried to get a free one).
Also, it was buggy since it did not consider unsetting the callback.

Besides GPIOTE channels, there is another way to deal with pin interrupts.
The GPIO peripheral is capable of generating a PORT event
(for the whole GPIO port) depending on the pin SENSE configuration
(HIGH or LOW, or NONE) and GPIO DETECTMODE register
(latching or non-latching).

This change then renames nrf52_gpiote_setevent into nrf52_gpiote_set_ch_event,
maintaining functionality of original function, but now allows specifying
channel (and correctly handles unsetting the callback). Then, a
new nrf52_gpiote_set_pin_event is added, which allows to set a callback
for a given pin. During initialization, interrupt for the PORT event is
enabled and handled in such way that for each pin whose corresponding
bit in LATCH register (indicates the result of pin SENSEing) the
callback for this pin will be invoked. This mechanism means that
every pin can get an ISR. It also avoids using GPIOTE channels for this
purpose which carry higher current consumption.

This new per-pin callback mechanism has some added memory requirement
so it can be disabled and its default is dependant on DEFAULT_SMALL.
When disabled, a callback for the PORT event can be set directly
with nrf52_gpiote_set_port_event

There was only one use of nrf52_gpio_setevent() which was migrated
into nrf52_gpio_set_ch_event() passing channel zero.
2020-11-09 20:23:29 +01:00
chao.an
182507f325 boards/sim: add atexit(2) into naming list
(gdb) b longjmp
Breakpoint 1 at 0x8270
(gdb) r
Starting program: /home/chao/code/m3/nuttx/nuttx
[    0.000000] Assertion failed at file:task/task_onexit.c line: 99

Breakpoint 1, 0xf7b905e0 in siglongjmp () from /lib/i386-linux-gnu/libc.so.6
(gdb)
(gdb) bt
|#0  0xf7b905e0 in siglongjmp () from /lib/i386-linux-gnu/libc.so.6
|#1  0xf7f9c3dc in siglongjmp_alias () from /lib/i386-linux-gnu/libpthread.so.0
|#2  0x5655d668 in up_assert (filename=0x56641018 "task/task_onexit.c", line=99) at sim/up_head.c:132
|#3  0x56567413 in _assert (filename=0x56641018 "task/task_onexit.c", linenum=99) at assert/lib_assert.c:36
|#4  0x565f8cfd in on_exit (func=0x565f8c12 <exitfunc>, arg=0x565fd780 <simuart_restoremode>) at task/task_onexit.c:99
|#5  0x565f8c89 in atexit (func=0x565fd780 <simuart_restoremode>) at task/task_atexit.c:109
|#6  0x565fd819 in simuart_start () at sim/up_simuart.c:112
|#7  0x5656c844 in up_uartinit () at sim/up_uart.c:496
|#8  0x5656ba7a in up_initialize () at sim/up_initialize.c:234
|#9  0x5655da56 in nx_start () at init/nx_start.c:701
|#10 0x5655d5e9 in main (argc=1, argv=0xffffd6f4, envp=0xffffd6fc) at sim/up_head.c:96

Change-Id: Ifd7196b2de7bf9fc7cea764c19a5c0eacf08fdb6
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 09:08:03 -03:00
Nathan Hartman
8e00110449 tiva/cc13x2_cc26x2: Merge related comments
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_flash.h:

    * Merge comments when they are section separators for
      similar/related registers:

      - TIVA_FLASH_FWPWRITE*
      - TIVA_FLASH_FSM_SECTOR1*
      - TIVA_FLASH_FSM_BSLE*
      - TIVA_FLASH_FSM_BSLP*
2020-11-08 13:39:56 -08:00
Juha Niskanen
ca7a7ccbeb Fix some typos in comments
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 18:58:20 +01:00
Nathan Hartman
350309856d tiva/cc13x2_cc26x2: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_flash.h:

    * Fix nxstyle errors.
2020-11-08 18:56:55 +01:00
Sara Souza
b9d44017cf xtensa/esp32: Watchdog support (MWDTs) 2020-11-08 13:05:24 -03:00
Nathan Hartman
94a10033e0 tiva/cc13x2_cc26x2: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_fcfg1.h:

    * Fix nxstyle errors.
2020-11-06 20:47:01 -03:00
Abdelatif Guettouche
2ac2ce55d2 arch/xtensa/src/esp32/esp32_allocateheap.c: Fix the memory regions with
regards to the data used by the ROM.
Static alloaction sections should end at the begining of the ROM data.
The rest of memory (End of ROM data --> End of DRAM) is added to the
heap.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-06 18:36:41 -03:00
Nicholas Chin
c7a9b66833 arch/arm/src/imxrt: adds support for WDOG1
Based on work done by Jake Choy.
2020-11-06 18:33:34 -03:00
Daniel P. Carvalho
a5d340a5df Add injected channel support. 2020-11-06 18:31:32 -03:00
Abdelatif Guettouche
5adcdcdc15 arch/arm/src/stm32l4/stm32l4_can.c: Fix nxstyle issues. 2020-11-06 18:28:27 -03:00
Pavel Pisa
be1496b40d stm32l4: correct build of stm32l4_can.c to respect L4 variant.
Signed-off-by: Pavel Pisa<ppisa@pikron.com>
2020-11-06 18:28:27 -03:00
Alan C. Assis
2f612a2077 xtensa/esp32: Move #if defined(SPIRAM) to inside function 2020-11-06 16:19:48 +01:00
Alan C. Assis
d11f02d772 xtensa/esp32: Fix remaining SEPARATE typo 2020-11-06 16:19:48 +01:00
Alan C. Assis
6c37d9ff80 xtensa/esp32: Avoid init PSRAM when SPIRAM is not enabled 2020-11-06 16:19:48 +01:00