Commit Graph

13056 Commits

Author SHA1 Message Date
Juha Niskanen
1ce75cc7c6 arch/arm/src/stm32/stm32_adc.c: do not allow negative ref count
When HAVE_HSI_CONTROL, adc_reset_hsi_disable() calls adc_reset()
followed by adc_shutdown() and this combination is called before
adc_setup() by upper level ADC driver. Without this patch,
priv->initialized wraps from 0 to 255 in this case.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-03 16:25:03 -03:00
Matias N
2395258486 nrf52: add POWER register definitions; support enabling DC/DC regulator 2020-11-03 08:43:43 -08:00
Frank-Christian Kruegel
168c14bb9d nxstyle errors fixed 2020-11-03 08:07:24 -08:00
Frank-Christian Kruegel
52097a4345 Added Support for more TI Tiva Microcontrollers:
* TM4C123GH6PZ (100 pin version of TM4C123GH6PM)
* TM4C123GH6PGE (144 pin version of TM4C123GH6PM)
* TM4C129ENCPDT (TM4C1294 with Crypto hardware added, TQFP package)
* TM4C129ENCZAD (TM4C1294 with Crypto hardware added, BGA package)
2020-11-03 08:07:24 -08:00
Nathan Hartman
d987dd2f5a stm32 - Fix wrong executable permission on header file
arch/arm/src/stm32/hardware/stm32g47xxx_vrefbuf.h:

    * Remove executable permission.
2020-11-02 18:16:25 +01:00
Nathan Hartman
6d3746c2e7 stm32 - Add register mappings for STM32Gxxxxx-family DAC
arch/arm/src/stm32/hardware/stm32gxxxxx_dac.h:

    * New file: Adds register definitions for the DAC peripheral.
2020-11-01 19:07:10 -08:00
Matias N
e91a806ab6 nrf52_spi: support not defining MISO/MOSI pins 2020-11-01 11:04:27 -08:00
Juha Niskanen
a01a01ab45 arch: spi: fix typos and run nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-31 10:40:41 -07:00
Juha Niskanen
77bbb07749 arch: imxrt, s32k1xx, stm32f7 spi: fix CONFIG_SPI_BITORDER build errors
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-31 10:40:41 -07:00
Juha Niskanen
e437bbd47e arch/arm: spi: fix incorrect comment about nbits being clobbered
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-31 10:40:41 -07:00
Juha Niskanen
de53ea3871 arch: spi: fix bad null-pointer assertions
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-31 10:40:41 -07:00
Juha Niskanen
d65acc6db4 arch: serial: fix typos and run nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-31 15:39:50 +01:00
Daniel P. Carvalho
aa4be3ccfd Adds low level function to allow external event configuration for regular group. 2020-10-30 22:16:15 -07:00
Nathan Hartman
cfc0aaea2b stm32/hardware/stm32_dac.h: Fix nxstyle errors
arch/arm/src/stm32/hardware/stm32_dac.h:

    * Fix nxstyle errors.
2020-10-30 19:58:45 -07:00
Matias N
1fa0aac36b nrf52: support configuring no console/serial 2020-10-30 19:58:26 -07:00
Nathan Hartman
4aa9b80d2b stm32 - Add register mappings for STM32G474 VREFBUF
arch/arm/src/stm32/hardware/stm32g47xxx_vrefbuf.h:

    * New file: Adds register definitions for the VREFBUF peripheral.
2020-10-30 19:57:54 -07:00
Nathan Hartman
03e9f936d9 tiva/cc13x2_cc26x2: Fix syntax error
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi3_refsys.h:

    * Fix syntax error. The define ADI3_REFSYS_DCDCCTL0_VDDR_TRIM_MIN
      had an unintentional comment closing "*/" in the middle of its
      name.
2020-10-30 07:47:13 -07:00
Nathan Hartman
889353d102 tiva/cc13x2_cc26x2: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi3_refsys.h:

    * Fix nxstyle errors.
2020-10-30 07:47:13 -07:00
Nathan Hartman
01fd55a0ac stm32/stm32_qencoder: Fix nxstyle errors
arch/arm/src/stm32/stm32_qencoder.c,
arch/arm/src/stm32/stm32_qencoder.h:

    * Fix nxstyle errors.
2020-10-29 23:50:36 -03:00
Matias N
4cbfbd0c74 nrf52_wdt: split into low-level API and watchdog driver lower-half
This separation allows to interact with the watchdog from OS code,
for example initiating the watchdog very early on boot. Moreover,
these changes make the lower-half driver support an already running
watchdog, which may happen if there's a bootloader which already
started it.
2020-10-29 20:17:33 -03:00
Bernd Walter
d6686b7409 s/BUSY/EBUSY typo fix, which ressulted in compile error 2020-10-30 07:19:34 +09:00
Matias N
99f56b89df nrf52832: add errata mitigation code for various RADIO issues 2020-10-29 10:38:42 -07:00
Juha Niskanen
cfa5b82e09 arch/arm/src/stm32l4/stm32l4_adc.c: fix copy-paste mistake with CONFIG_STM32L4_ADC1_DMA_CFG
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-29 06:32:00 -07:00
Nathan Hartman
a3b37709ba tiva/cc13x2_cc26x2: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_prcm.h:

    * Fix nxstyle errors.
2020-10-28 19:20:28 -07:00
Nathan Hartman
892c6b254a tiva/cc13x2_cc26x2: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_pmctl.h:

    * Fix nxstyle errors.
2020-10-27 09:54:02 -07:00
Daniel P. Carvalho
8339bac6e4 Replaces BSD license by Apache License. 2020-10-27 11:11:40 -03:00
Daniel P. Carvalho
8c04cc86c0 Improvements on ADC driver
* Add option to start adc at setup
  * Add option to cofigure ADC resolution
  * Add option to cofigure ADC sample time
  * Add option to cofigure ADC DMA
  * Add suport for low level operations.
2020-10-27 11:11:40 -03:00
Nathan Hartman
6f029174f2 tiva/cc13x2_cc26x2: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_rtc.h:

    * Fix nxstyle errors.
2020-10-26 10:39:32 -07:00
Masayuki Ishikawa
904a602c74 arm: armv7-a: Fix kernel stack dump in arm_assert.c
Summary:
- This commit fixes kernel stack dump information

Impact:
- Affects armv7-a with kernel build

Testing:
- Built with sama5d4-ek:knsh
- Not tested

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
3c4bf1a2bf arch: armv6-m: Refactor interrupt stack related code
Summary:
- Apply the same logic for armv7-m
- NOTE: stack pointer alignment is 4-byte

Impact:
- Affects armv6-m with interrupt stack enabled

Testing:
- Built with freedom-kl25z:nsh (CONFIG_ARCH_INTERRUPTSTACK=2048)
- Not tested but should work

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
0b73eec5cd arch: armv8-m: Refactor interrupt stack related code
Summary:
- Apply the same logic for armv7-m
- NOTE: stack pointer alignment is 8-byte

Impact:
- Affects armv8-m with interrupt stack enabled

Testing:
- Not tested but should work

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
d553515758 armv7-m, cxd56xx, lc823450: Refactor interrupt stack related code
Summary:
- Remove +4/-8 offset coding
- Also, fix alignments for g_intstackalloc
- NOTE: stack pointer alignment is 8-byte

Impact:
- Affects armv7-m with interrupt stack enabled

Testing:
- Tested with spresense:wifi_smp
- Tested with lc823450:smp
- Tested with stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
32563b15ac arch: armv7-r: Refactor interrupt stack related code
Summary:
- Apply the same logic for armv7-a
- NOTE: stack pointer alignment is 8-byte

Impact:
- Affects armv7-r with interrupt stack enabled

Testing:
- Not tested but should work

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
973a6c49b6 arm, c5471: Refactor interrupt stack related code
Summary:
- Apply the same logic for armv7-a
- NOTE: stack pointer alignment is 4-byte

Impact:
- Affects arm (arm7/9) and c5471 with interrupt stack enabled

Testing:
- Built with c5471evm.nsh (CONFIG_ARCH_INTERRUPTSTACK=2048)
- Built with ea3131:nsh (CONFIG_ARCH_INTERRUPTSTACK=2048)
- Not tested but should work

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
6e12f3c782 armv7-a, imx6: Refactor interrupt stack related code
Summary:
- Remove -4/-8 offset coding in imx_irq.c and arm_vectors.S
- Instead, add SP adjustment after calling setirqstack/setfiqstack
- Fix off-by-one irq/fiq stack allocation in 8-byte aligned arch
- Fix comments on the user stack pointer in arm_vectors.S
- Also, fix up_dumpstate() to extract the user stack pointer
- NOTE: stack pointer alignment is 8-byte

Impact:
- Affects armv7-a with interrupt stack enabled

Testing:
- Tested with sabre-6quad:smp with QEMU
- Tested with sabre-6quad:nsh with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
eddf1189be arch: armv7-a: Fix CPUx IDLE stack top for SMP
Summary:
- This commit fixes CPUx IDLE stack top for SMP
- Also removes SMP_STACK_TOP from smp.h

Impact:
- Affects armv7-a SMP only

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

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
9120a3022d arch: armv7-a: Fix style warnings in arm_cpuidlestack.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
92ebbd7d21 arch: armv7-a: Fix style warnings in smp.h
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Alan C. Assis
34df2126b3 Fix missing 'ret' reported by Frank-Christian Kruegel 2020-10-26 15:26:49 +01:00
dongjiuzhu
d452a05910 pollnotify: we should send poll events before semaphore incrementes.
There is a good case on sim platform:
When we input some cmd and click enter key to start application in terminal,
this context will change to application from IDLE loop. Althrough entey key '\r'
has been received to recv buffer and complete post semaphore of reader, but
pollnotify may not be called because context change. So when application run
poll function, because no events happend and poll enter wait, context will
again change to IDLE loop, this pollnotify of IDLE loop will run to send poll
events, poll function of applicaton will wake up. It's wrong!

Change-Id: I812a889f2e90781a9c3cb4b0251cccc4d32bebd1
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-26 08:27:09 -03:00
Simon Piriou
13e10504c9 arch: stm32: nxstyle check for otghs driver 2020-10-26 08:17:25 -03:00
Simon Piriou
3eb3b0da4d arch: stm32: fix otghs logic to support interface requests 2020-10-26 08:17:25 -03:00
Yoshinori Sugino
3ac90fca79 Remove tabs and spaces at the end of lines 2020-10-24 09:38:21 +01:00
Nathan Hartman
f9a6988ca8 tiva/cc13x2_cc26x2: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ccfg.h,
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_vims.h:

    * Fix nxstyle errors.
2020-10-23 01:32:17 +08:00
Nathan Hartman
81cfa88fc5 tiva/cc13x2_cc26x2: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_adi4_aux.h,
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aux_smph.h,
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_ddi.h,
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_memorymap.h,
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_smph.h:

    * Fix nxstyle errors.
2020-10-22 00:20:42 +08:00
Philippe Coval
271016a3ad kinetis: Make kinetis_i2c_sem_wait_noncancelable optional
CONFIG_I2C_RESET is coming from imxrt_lpi2c.c

Change-Id: I8f55eaf793386fe5ac1d4adaf310d6e0f08dcd92
Bug: https://github.com/apache/incubator-nuttx/pull/1999
Forwarded: https://github.com/apache/incubator-nuttx/pulls/rzr
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2020-10-21 13:36:55 +08:00
Masayuki Ishikawa
dad5a79bf3 arch: arm: Fix interrupt stack handlings for SMP
Summary:
- Modify arm_intstack_base() to return "top" of the IRQ stack for the current CPU
- This change fixes IRQ stack dump information for ARM SMP
- Add arm_intstack_alloc() to return "bottom" of the IRQ stack for the current CPU
- Also, these functions are now implemented in xxx_irq.c (imx/cxd56/lc823450)
- up_color_intstack() and up_check_intstack() now call arm_intstack_alloc()
- These semantics are now consistent with non-SMP case
- up_color_intstack() now initializes whole IRQ stack region for SMP
- Adjust IRQ stack top address for each CPU (e.g. -8)
- Fix setintstack to handle in case of NCPUS=1 (cxd56, lc823450)
- Adjust INTSTACK_SIZE to 8 bytes alignment (cxd56, lc823450)
- Refactor setintstack for lc823450
- Remove old IRQ stack coloring code from up_irqinitialize() (lc823450)
- Introduce g_cpu_intstack_top for lc823450
- Refactor header files

Impact:
- Affects imx6/cxd56xx/lc823450 SMP with interrupt stack enabled

Testing:
- Tested with sabre-6quad:smp (with QEMU, NCPUS=1 and 4)
- Tested with spresense:wifi_smp (NCPUS=1 and 2)
- Tested with lc823450-xgevk:rndis (NCPUS=1 and 2)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-21 11:49:45 +08:00
Masayuki Ishikawa
56a081515c arch: imx6: Fix style warnings in chip.h
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-21 11:49:45 +08:00
Xiang Xiao
2956b8516b Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 01:45:06 -07:00
Xiang Xiao
eb4121ce38 Change all 'Nuttx' to 'NuttX'
Unify the naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 01:45:06 -07:00
liuhaitao
d5c6bfe6cf arch: Add custom arch chip build support
Just like custom board build support, add custom arch chip build
support.

Change-Id: I71c87e6b2195501a1b1d728b71d7cbe344951057
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-10-20 14:48:16 +08:00
Brennan Ashton
5e8bcaa360 serial: nxstyle fixes
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-20 14:43:19 +08:00
Juha Niskanen
94f0f55911 arch: serial: fix all TCGETS retrieving zero baud rate
cfsetispeed() now stores baud rate to c_cflag member of
struct termios, so it must not be overridden later on.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-20 14:43:19 +08:00
Nathan Hartman
f8a3736b5c tiva/cc13x0: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x0/cc13x0_adi4_aux.h,
arch/arm/src/tiva/hardware/cc13x0/cc13x0_aux_smph.h,
arch/arm/src/tiva/hardware/cc13x0/cc13x0_ccfg.h,
arch/arm/src/tiva/hardware/cc13x0/cc13x0_ddi.h,
arch/arm/src/tiva/hardware/cc13x0/cc13x0_memorymap.h,
arch/arm/src/tiva/hardware/cc13x0/cc13x0_smph.h:

    * Fix nxstyle errors.
2020-10-19 16:50:48 +01:00
Xiang Xiao
525f6da1c0 arch/armv7-a: Fix the wrong idle stack setup for SMP case
1.Get the stack pointer from sp instead of .Lstkinit's field
2.Make g_idle_topstack point to the end of the idle stack

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-19 09:43:58 +09:00
Nathan Hartman
a066186127 tiva/cc13xx: Fix nxstyle errors
arch/arm/src/tiva/hardware/tiva_adc.h,
arch/arm/src/tiva/hardware/tiva_ssi.h:

    * Fix nxstyle errors.
2020-10-19 01:33:21 +08:00
Michal Lenc
b5e9961036 Fix nxstyle errors and warnings
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-10-17 19:38:42 -03:00
Michal Lenc
1670709187 imxrt: FlexCAN driver
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-10-17 19:38:42 -03:00
Abdelatif Guettouche
609a5fa4f0 arch/: Add the ARCH_SRC directory to the context and clean_context
targets

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-17 22:46:27 +09:00
Fotis Panagiotopoulos
4c7d7d51f8 Minor improvement in STM32 Kconfig menus. 2020-10-17 10:40:33 -03:00
Nathan Hartman
b5d4f3fbc9 tiva/cc13xx: Fix nxstyle errors
arch/arm/src/tiva/cc13xx/cc13x0_rom.h,
arch/arm/src/tiva/cc13xx/cc13x2_cc26x2_v2_rom.h:

    * Fix nxstyle errors; nxstyle was complaining about lack of a
      space after comma because of the presence of line
      continuation backslashes immediately after the comma.
      Removed these backslashes as they are not necessary: these
      lines are typedefs, not preprocessor defines.
2020-10-17 09:04:08 +01:00
Eduard Niesner
0544c52cbf arch/arm/src/stm32h7/stm32_spi.c: fixed build issue when SPI is configured without DMA 2020-10-16 14:00:48 -07:00
Fotis Panagiotopoulos
4f44961e0b Improved Kconfig help entry for ARMV7M_STACKCHECK. 2020-10-16 10:01:26 -07:00
Nathan Hartman
5c258f52bf tiva/cc13xx: Fix nxstyle errors
arch/arm/src/tiva/cc13xx/cc13x2_v2_trim.c:

    * Fix nxstyle errors.
    * No functional changes; however modified one function,
      trim_wakeup_fromshutdown(), to avoid blocks that existed
      only to declare variables mid-function; nxstyle was
      complaining about the positions of the opening and
      closing braces of those blocks.
2020-10-16 10:07:14 +08:00
Nathan Hartman
90476c9895 tiva/cc13xx: Fix nxstyle errors
arch/arm/src/tiva/cc13xx/cc13x2_aux_sysif.c:

    * Fix nxstyle errors.

arch/arm/src/tiva/cc13xx/cc13x2_aux_sysif.h:

    * Fix nxstyle errors.

arch/arm/src/tiva/cc13xx/cc13xx_enablepwr.c:

    * Fix nxstyle errors.
2020-10-14 17:03:23 +02:00
Nathan Hartman
66c8d77dd9 tiva/cc13xx: Fix syntax error and nxstyle error
arch/arm/src/tiva/cc13xx/cc13xx_gpioirq.c:

    * Fix syntax error: stray closing parenthesis in function
      cc13xx_gpio_interrupt().
    * Fix nxstyle error.
2020-10-14 17:03:23 +02:00
David Sidrane
a907e2ad63 kinetis:flexcan fixed compile error clock_systimespec->clock_systime_timespec 2020-10-14 21:14:55 +08:00
Nathan Hartman
9e70e3580f tiva: Fix nxstyle warnings
arch/arm/src/tiva/cc13xx/cc13xx_prcm.c:

    * Fix nxstyle warnings. No functional changes.
2020-10-13 16:24:20 +01:00
Nathan Hartman
78049d4081 tiva: Fix nxstyle warnings
arch/arm/src/tiva/cc13xx/cc13xx_prcm.h:

    * Fix nxstyle warnings. No functional changes.
2020-10-13 10:06:22 +08:00
Johannes Schock
dd7b5cb228 ARM stack fix: Same boundary calculation in do_stackcheck and stack_color.
Use additional space from 8 byte aligning for stack in up_create_stack().
Moved arm_stack_color to arm_checkstack.c.
2020-10-12 10:52:33 -07:00
Nathan Hartman
55b9f046c9 tiva: Fix nxstyle warnings
arch/arm/src/tiva/common/lm4xx_tm3c_sysctrl.c:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/lmxx_tm4c_enableclks.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/lmxx_tm4c_enablepwr.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/lmxx_tm4c_gpioirq.c:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/lmxx_tm4c_start.c:

    * Fix nxstyle warnings. No functional changes.
2020-10-11 20:36:47 +01:00
raiden00pl
650997e1f6 Fix nxstyle warnings 2020-10-10 12:24:28 -06:00
raiden00pl
17255414b5 stm32: Changed headers for apache 2.0 license 2020-10-10 12:24:28 -06:00
raiden00pl
29541e59e0 stm32h7: Changed headers for apache 2.0 license 2020-10-10 12:24:28 -06:00
raiden00pl
33901969fe Fix nxstyle warnings 2020-10-10 12:24:28 -06:00
raiden00pl
25c58f2a32 stm32f0l0g0: Changed headers for apache 2.0 license 2020-10-10 12:24:28 -06:00
raiden00pl
478de48bc7 nrf52: Changed headers for apache 2.0 license 2020-10-10 12:24:28 -06:00
Nathan Hartman
18edab3ad2 tiva: Fix nxstyle warnings
arch/arm/include/tiva/cc13x0_irq.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/include/tiva/cc13x2_cc26x2_irq.h:

    * Fix nxstyle warnings. No functional changes.

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

    * Fix nxstyle warnings. No functional changes.

arch/arm/include/tiva/irq.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/include/tiva/lm3s_irq.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/include/tiva/lm4f_irq.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/include/tiva/tm4c_irq.h:

    * Fix nxstyle warnings. No functional changes.
2020-10-09 15:35:38 +01:00
Masayuki Ishikawa
bebc2d2405 arch: cxd56xx: Fix IRQ request handling in cxd56_cpupause.c
Summary:
- During Wi-Fi audio streaming test, I noticed data corruption in tcb
- Finally, I found an issue in IRQ request handing with IPI
- This commit fixes this issue

Impact:
- Affects SMP only

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-08 09:02:17 +02:00
Nathan Hartman
8eec165aab tiva/lm3s: Fix nxstyle warnings
arch/arm/src/tiva/lm/lm3s_gpio.c:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/lm/lm3s_gpio.h:

    * Fix nxstyle warnings. No functional changes.
2020-10-07 11:50:46 -03:00
Masayuki Ishikawa
2be53a9335 arch: cxd56xx: Add interrupt stack for SMP
Summary:
- This commit adds interrupt stack for SMP

Impact:
- Affects SMP only

Testing:
- Tested with spresense:wifi_smp with CONFIG_ARCH_INTERRUPTSTACK=2048

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-06 12:42:01 +02:00
Masayuki Ishikawa
4c0602f52c arch: cxd56xx: Introduce cxd56_cpuindex.h
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-06 12:42:01 +02:00
Nathan Hartman
ab4ca67b91 tiva/lm4f: Fix nxstyle warnings
arch/arm/src/tiva/lm/lm4f_gpio.c:

    * Fix nxstyle warnings. No functional changes.
2020-10-06 10:44:21 +08:00
Nathan Hartman
8a1f4db2e1 tiva/cc13xx: Fix nxstyle warnings
arch/arm/src/tiva/cc13xx/cc13xx_start.c:

    * Fix nxstyle warnings. No functional changes.
2020-10-02 13:20:42 -03:00
Nathan Hartman
80ce7800a9 Sources and Docs: Fix typos and nxstyle issues
Documentation/contributing/coding_style.rst:

    * Fix repeated words: ("this this").
    * Remove trailing spaces.

boards/z80/z80/z80sim/README.txt:

    * Fix repeated words: ("this this") and rewrap lines.

graphics/Kconfig,
libs/libc/math/Kconfig:

    * Fix repeated words: ("this this").

arch/arm/src/armv7-a/arm_assert.c,
arch/arm/src/armv7-r/arm_assert.c,
arch/arm/src/imxrt/imxrt_enet.c,
arch/arm/src/kinetis/kinetis_enet.c,
arch/arm/src/kinetis/kinetis_flexcan.c,
arch/arm/src/s32k1xx/s32k1xx_enet.c,
arch/arm/src/s32k1xx/s32k1xx_flexcan.c,
arch/arm/src/stm32/stm32_pwm.c,
arch/arm/src/stm32h7/stm32_pwm.c,
arch/arm/src/stm32l4/stm32l4_pwm.c,
arch/renesas/src/rx65n/rx65n_usbdev.c,
binfmt/libnxflat/libnxflat_bind.c,
drivers/pipes/pipe_common.c,
net/igmp/igmp_input.c,
net/tcp/tcp_conn.c,
sched/sched/sched_roundrobin.c:

    * Fix typo in comment ("this this").

arch/arm/src/cxd56xx/cxd56_usbdev.c,
arch/arm/src/lc823450/lc823450_usbdev.c:

    * Fix typo in comment and rewrap lines.

arch/arm/src/imxrt/imxrt_usbdev.c,
arch/arm/src/stm32/stm32_dac.c,
arch/arm/src/stm32f0l0g0/stm32_pwm.c,
arch/arm/src/stm32f7/stm32_pwm.c,
arch/arm/src/tiva/lm/lm4f_gpio.h,
fs/nxffs/nxffs_write.c,
include/nuttx/analog/pga11x.h,
include/nuttx/usb/usbdev.h,
net/mld/mld_join.c:

    * Fix typo in comment ("this this").
    * Fix nxstyle issues.
2020-10-02 04:54:52 +02:00
Masayuki Ishikawa
3f461f59ba arch: cxd56xx: Fix handle_irqreq() in cxd56_cpupause.c
Summary:
- The handle_irqreq() is used for remote IRQ control.
- The logic is called via IPI (Inter-Processor Interrupt)
- And the handler should handle only one request
- However, I noticed that the handler handles up to two requests
- This commit fixes this issue

Impact:
- Affects SMP cases only

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-02 04:53:53 +02:00
Matias N
2cda47272a nrf52_ppi: fix group disable and add group clear operation 2020-10-01 21:31:58 -03:00
David Sidrane
f6aa845080 stm32f7:Allow the use of the Network Monitor via polling
Not all boards have an interrupt line from the phy to
   the Soc. This commit allows the phy to be polled for
   link status.

   This may not work on all MAC/PHY combination that
   have mutually exclusive link management and operating
   modes. The STM32F7 and LAN8742AI do not have such a
   limitation.
2020-10-01 15:28:51 +08:00
Nathan Hartman
4ac2c73d82 tiva: Fix nxstyle warnings
arch/arm/src/tiva/tm4c/tm4c129_sysctrl.c:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/tm4c/tm4c_gpio.c:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/tm4c/tm4c_gpio.h:

    * Fix nxstyle warnings. No functional changes.
2020-10-01 12:14:27 +08:00
patacongo
9142deeb10 Update arch/arm/src/common/arm_interruptcontext.c
Add a comment discussing the limitation of this solution for the case of the ARMv7-A with the GIC
2020-09-30 08:32:25 -06:00
Masayuki Ishikawa
bbc6571b28 arch: arm: Fix up_interrupt_context() for SMP
Summary:
- I found an issue with up_interrupt_context() when testing.
- And finally found that up_interrupt_context() is not atomic.
- This commit fixes the issue

Impact:
- Affects SMP only

Testing:
- Tested with spresense:wifi_smp and sabre-6quad:smp (qemu)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-30 08:32:25 -06:00
raiden00pl
c18e7bb422 nrf52_lowputc.c: fix compilation error for nrf52832 which has limited baud rate support 2020-09-30 09:09:04 -03:00
raiden00pl
4da122b8d4 nrf52_serial.c: fix unused wariable warning 2020-09-30 09:09:04 -03:00
raiden00pl
35a5036e32 nrf52: add serial termios support 2020-09-30 09:09:04 -03:00
Nathan Hartman
fc404e15da tiva: Fix nxstyle warnings
arch/arm/src/tiva/hardware/tiva_eeprom.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/hardware/tiva_sysctrl.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/hardware/tiva_uart.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/hardware/tiva_wdt.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-29 16:59:17 +01:00
Brennan Ashton
bbf16b27d9 nRF52: Add basic error handling for i2c in polling mode
There was no error handling before and it would block on common
cases like NACK which meant that you could not use the i2ctool
to perform a scan of the bus.

This does not handle the interrupt flow which also has incomplete
error handling.
2020-09-28 09:34:08 -03:00
Yoshinori Sugino
698008d1e5 Fix typos 2020-09-28 13:54:43 +08:00
Nathan Hartman
a4aecb4f42 tiva: tiva_i2c.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_i2c.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-28 00:14:01 +08:00
David Sidrane
4a6f7cacd5 stm32f7:serial Bug Fix: Ensure next buffer is processed
When the Head to Tail relationship was H < T, then
   only the tail to end of buffer was sent.

   The fix is: In the txdma completion to do a second
   the DMA operation using nbuffer if the nlength is
   non zero.

stm32f7:serial UART5 use actual size

   UART5 was using the CONFIG_UART5_TXBUFSIZE
   not the UART5_TXBUFSIZE_ADJUSTED.
   Since the buffer size was adjusted up, this
   has no dcache implications.
   If the UART5_TXBUFSIZE_ADJUSTED is larger
   then CONFIG_UART5_TXBUFSIZE it will present
   a larger usable buffer to the system's
   serial driver.
2020-09-25 22:09:05 +01:00
Nathan Hartman
090d822f33 tiva: Fix nxstyle warnings
arch/arm/src/tiva/tiva_gpio.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/tiva_mpuinit.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/tiva_qencoder.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-25 16:37:45 +01:00
Nathan Hartman
44d7f14121 tiva: tiva_ssi.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_ssi.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-24 16:00:55 -03:00
Matias N
0f9fb67b0c nrf52 spi: build fixes for !SPI_EXCHANGE 2020-09-24 09:51:51 -03:00
Nathan Hartman
c8bb4474bb tiva: tiva_periphrdy.h, tiva_pwm.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_periphrdy.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/tiva_pwm.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-23 22:00:17 +01:00
Thomas Axelsson
f193f0f702 imxrt: Style fixes in mux and ADC hardware headers 2020-09-23 13:16:33 -03:00
Thomas Axelsson
d67bc0c3c8 imxrt: ADC driver
Based on LPC17xx_40xx and STM32 drivers.
2020-09-23 13:16:33 -03:00
Daniel Mesham
c8dc9e39ac arch/arm: stm32l4: Fix typo in TIM15 PWM config
When configuring TIM15_CH2 as output, we mistakenly referred to TIM12 instead.
2020-09-23 14:29:10 +02:00
Daniel Agar
3df8f79111 stm32f412ce fixes 2020-09-22 22:44:43 -07:00
saramonteiro
7d889bf4c4 nrf52: Fix typo, replace setcc with getcc 2020-09-22 21:07:31 -03:00
Xiang Xiao
031984f76a arch/arm: Select arm family when ARCH_ARM1136J/ARCH_ARM1156T2/ARCH_ARM1176JZ is defined
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-22 23:05:29 +01:00
Xiang Xiao
d078518502 arch/arm: Should include arch/armv8-m/spinlock.h when CONFIG_ARCH_ARMV8M is defined
forget in commit 2376d8a266
Author: qiaowei <qiaowei@xiaomi.com>
Date:   Wed Apr 22 10:09:50 2020 +0800

    Porting arch/armv8-m support

    1. Add dsp extension; float point based on hardware and software.
    2. Delete folder "iar"
    3. Add tool chain for cortex-M23 and cortex-M35p

    Signed-off-by: qiaowei <qiaowei@xiaomi.com>
    Change-Id: I5bfc78abb025adb0ad4fae37e2b444915f477fe7

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-22 23:05:29 +01:00
Xiang Xiao
7faf72cabc arch/arm: Add ARCH_ARMV6M Kconfig to prepare the support of CortexM0+
also align with the armv7m implementation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-22 23:05:29 +01:00
Nathan Hartman
560a052144 tiva: tiva_timer.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_timer.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-22 10:29:28 -07:00
Nathan Hartman
bc9d3cdd14 tiva: tiva_flash.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_flash.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-21 22:04:45 +01:00
Nathan Hartman
4ceb8ef4e1 tiva: tiva_sysctrl.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_sysctrl.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-18 23:50:59 +01:00
Brennan Ashton
1473c6848f nRF52: Add hooks for missing SPI register callbacks
This implements the missing callback hooks nrf52_spi0/1/2/3register
that are usually used with mmcsd for card detection.

This also stubs out the missing spi trigger function which is not
used on this platform.

The card detect was tested with the nRF52-feather board and a
modified KeyBoard FeatherWing.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-18 04:31:47 -07:00
Fotis Panagiotopoulos
b0b5f87699 Removed broken overdrive function in STM32. 2020-09-18 02:53:40 -07:00
Nathan Hartman
a4d1a20b93 tiva: tiva_lowputc.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_lowputc.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-17 11:07:35 -07:00
Nathan Hartman
e916896aa9 tiva: tiva_eeprom.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_eeprom.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-16 22:15:34 -03:00
Nathan Hartman
de7953c0ee tiva: tiva_userspace.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_userspace.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-16 09:45:17 -07:00
Xiang Xiao
1475309c5b Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-16 06:57:29 -07:00
Xiang Xiao
bf7399a982 arch: Initialize idle thread stack information
and remove the special handling in the stack dump

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia1ef9a427bd4c7f6cee9838d0445f29cfaca3998
2020-09-16 06:57:29 -07:00
Brennan Ashton
8602e46d4a nRF: Add missing Kconfig entry for SPI2_MASTER
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-16 07:26:29 +02:00
Matias N
166242c171 use "export" to expose TOPDIR to all child make instead of passing it around every time 2020-09-15 21:11:33 -07:00
Nathan Hartman
0eae2a1f59 tiva: tiva_ssi.c: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_ssi.c:

    * Fix nxstyle warnings. No functional changes.
2020-09-15 12:48:20 -03:00
Nakamura, Yuuichi
7ce5369873 Fix cxd56 uart deadlock 2020-09-15 15:12:02 +09:00
Brennan Ashton
c9e618b7b6 nRF: Incorrect base addresses for SPI controllers 1,2,3
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-14 19:11:21 -03:00
Nathan Hartman
e681396d35 tiva: tiva_lowputc.c, tiva_qencoder.c: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_lowputc.c:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/tiva_qencoder.c:

    * Fix nxstyle warnings. No functional changes.
2020-09-14 12:16:28 -03:00
Brennan Ashton
93eeecff6a nrf52: SPI transfer failure and corruption
The current EasyDMA implementation will fail if a transfer of over
255 bytes is requested with no warning.

Also we do not set the RX and TX transfer lengths to 0 if the
buffer is NULL which can cause data to be written to the old
address as well as cause unexpected transaction lenghts.
Example:
  transfer 1:
   rx_len  = 10
   rx_buff != NULL
   tx_len  = 10
   tx_buff != NULL
  transfer 2:
   rx_len = 2
   rx_buff != NULL
   tx_buff == NULL
  Total transaction length for the second would be 10 because it
  would still be using the old rx length of 10 and would
  corrupt data in the old rx buffer.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-14 07:21:24 +02:00
Matias N
3d1159007f Remove extra application of EXTRAFLAGS and KDEFINE and the arch-level
EXTRAFLAGS is already applied to *FLAGS in board's Make.defs (and
it applies to whole build, not just arch-code). EXTRAFLAGS is passed
around each make call to the complete build.

KDEFINE is already added to EXTRAFLAGS in main Makefile so no need
to add it again in arch-level Makefile
2020-09-14 13:59:57 +09:00
Brennan Ashton
5f85024d8c nrf52: SPI cmddata function mapping wrong for SPI(0,2,3)
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-13 21:19:17 -03:00
Nathan Hartman
1ab683387d tiva: tiva_eeprom.c: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_eeprom.c:

    * Fix nxstyle warnings. No functional changes.
2020-09-13 13:11:26 -03:00
raiden00pl
49d0d41234 arch/arm/src/nrf52/nrf52_pwm.c: add missing index for pwm2 and pwm3 2020-09-13 10:57:11 -03:00
raiden00pl
e7f3028aa6 nrf52: add ADC support 2020-09-13 10:57:11 -03:00
raiden00pl
a2b00fd348 nrf52: add PWM support 2020-09-13 10:57:11 -03:00
Nathan Hartman
70caa27c4c tiva: tiva_dumpgpio.c: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_dumpgpio.c:

    * Fix nxstyle warnings. No functional changes.
2020-09-12 00:38:37 +08:00
Xiang Xiao
b0797263ca libc/stdio: Allocate file_struct dynamically
1.Reduce the default size of task_group_s(~512B each task)
2.Scale better between simple and complex application

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia872137504fddcf64d89c48d6f0593d76d582710
2020-09-11 17:58:17 +08:00
Masayuki Ishikawa
154d6bc556 arch: cxd56xx: Use spinlock API in cxd56_gpioint.c
Summary:
- This commit improves cxd56_gpioint performance in SMP mode.

Impact:
- This commit affects SMP mode only.

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-11 17:27:42 +08:00
Nathan Hartman
3316c196d4 tiva: tiva_adclow.c, tiva_allocateheap: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_adclow.c:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/tiva_allocateheap.c

    * Fix nxstyle warnings. No functional changes.
2020-09-10 23:54:17 +08:00
Matias N
459ad29799 nrf52: extend systimer support; support WFI/WFE again
This commit exends systimer options for nRF52 arch. It is possible
to use ARM SysTick either for tickless or non-tickless mode. Also,
it is possible to use the RTC peripheral for tickless mode. This
also re-enables support for WFI/WFE sleep if RTC is used, since
this counter continues to run in this mode (in contrast to SysTick).
2020-09-10 12:10:20 +02:00
Matias N
dcd49c3882 nrf52_rtc: add missing getcounter() 2020-09-10 12:10:20 +02:00
Masayuki Ishikawa
22651fa22b arch: cxd56xx: Introduce cxd56_testset.c
Summary:
- I noticed that ldrex/strex on cxd56xx have an issue
- The issue is still under investigation
- This commit introduces a custom testset to avoid the issue

Impact:
- Affects cxd56xx in SMP mode if it is enabled

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-10 08:52:22 +02:00
Ouss4
06ca12e6b9 arch/: Trivial typos, mostly "their is" to "there is" 2020-09-09 14:09:43 -04:00
Nathan Hartman
8f6b2f6948 tiva: tiva_adclib.c: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_adclib.c:

    * Fix nxstyle warnings. No functional changes.
2020-09-09 08:35:19 -07:00
barbiani
20c5c57cf6 Update tiva_timerlow32.c
Missing callback argument field.
2020-09-09 08:34:26 -07:00
David Sidrane
9106c4ec2b stm32h7:DMA Do not disqualify DMA capability based on cache alignment 2020-09-09 14:09:52 +02:00
David Sidrane
2d9e0f6a76 stm32f7:DMA Do not disqualify DMA capability based on cache alignment 2020-09-09 14:09:52 +02:00
Masayuki Ishikawa
ce93fe76e5 arm: cxd56xx: Fix nvic settings for SMP
Summary:
- I noticed that ostest sometimes stops with DEBUGASSERT
- Finally I found a bug that cpu1 can not disable interrupt
- This commit initializes nvic to fix this bug

Impact:
- Only affects cxd56 in SMP mode

Testing:
- spresense:smp and spresense:wifi_smp with DEBUG_ASSERTIONS=y

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-09 08:31:30 +02:00
Nathan Hartman
835d394856 tiva: tiva_timerlow32.c: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_timerlow32.c:

    * Fix nxstyle warnings. No functional changes.
2020-09-08 23:38:09 +08:00
Xiang Xiao
f99719e260 Move note driver from drivers/syslog to drivers/note
it's better to put the note transport layer into a common folder

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-07 11:54:10 +08:00
Johannes Schock
9e69b87aa3 Added KDEFINE (__KERNEL__) to EXTRAFLAGS for libboard. 2020-09-05 21:25:31 +08:00