Commit Graph

12843 Commits

Author SHA1 Message Date
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
David Sidrane
719246eddc stm32h7:i2c driver fixed iterrupt storm
Driver was getting into a state that it would keep
   generating interrups and not service them.
2020-09-05 16:41:01 +08:00
Nathan Hartman
e67f72b02d stm32: lowputc: Ensure USART is disabled before configuring
arch/arm/src/stm32/stm32_lowputc.c:

    * stm32_lowsetup(): Ensure the USART is disabled before attempting
      to configure it because some register bits cannot be modified
      otherwise. This solves an issue that was encountered when a
      serial bootloader did not perform a full teardown/cleanup before
      launching NuttX.
2020-09-04 17:39:19 -07:00
Masayuki Ishikawa
08c4376606 arch, include, sched : Refactor ARCH_GLOBAL_IRQDISABLE related code
Summary:
- ARCH_GLOBAL_IRQDISABLE was initially introduced for LC823450 SMP
- At that time, i.MX6 (quad Cortex-A9) did not use this config
- However, this option is now used for all CPUs which support SMP
- So it's good timing for refactoring the code

Impact:
- Should have no impact because the logic is the same for SMP

Testing:
- Tested with board: spresense:smp, spresense:wifi_smp
- Tested with qemu: esp32-core:smp, maix-bit:smp, sabre-6quad:smp
- Build only: lc823450-xgevk:rndis, sam4cmp-db:nsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-03 10:20:20 +08:00
Johannes Schock
a5a3e54be0 Kinetis USBHSHOST: Changed Async Await to linked list, restored two accidently deleted lines. 2020-09-01 20:49:03 +01:00
Johannes Schock
e521c224c1 Kinetis USBHSHOST improvement.
Avoid race conditions during freeing of queue head structures by using Async Advance Doorbell.
2020-09-01 20:49:03 +01:00
raiden00pl
a52f6529a0 arch/arm/src/nrf52/nrf52_irq.c: fix compilation warning 2020-09-01 12:02:20 -03:00
raiden00pl
94d81611f4 arch/arm/src/nrf52/nrf52_i2c.c: fix typo 2020-09-01 12:02:20 -03:00
raiden00pl
0438ed22d0 arch/nrf52: add UID support 2020-09-01 12:02:20 -03:00
raiden00pl
2a4d7de278 arch/nrf52: add ARM system reset support 2020-09-01 12:02:20 -03:00
Masayuki Ishikawa
7e94997eeb arch: cxd56xx: Use spinlock API in cxd56_uart.c
Summary:
- This commit improves cxd56_uart performance in SMP mode.

Impact:
- This commit affects SMP mode only.

Testing:
- Tested with spresense:smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-01 11:55:14 +02:00
Gregory Nutt
55a9172bc2 Fix Cygwin build with Windows native toolchain
PR #1450 broke the Cygwin build.  Refer to Issue #1672.

The use of of logic like:

    EXTRA_LIBPATHS += -L "${dir ${shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcc.a}}"

fails when the Toolchain $(CC) is a native Windows toolchain.  That is because the returned path is a Windows-style patch which cannot be handled by the make 'dir' command.  Commit 4910d43ab0 reorganized a lot of definitions and replaced the correct code with the use of the limit make 'dir' command.  The original code used the Bash dirname command which does not suffer from this limitation; it can handle both POSIX and Windows paths.

This was verified using the stm32f4discover:nsh toolchain with the Windows native ARM Embedded toolchain.  That toolchain returns:

    arm-none-eabi-gcc --print-file-name=libgcc.a
    c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/libgcc.a
2020-09-01 10:20:28 +08:00
Matias N
da88467d6e nrf52_gpiote: add support for TASK mode 2020-08-31 19:39:15 +02:00
raiden00pl
3241ebf811 arch/nrf52: remove redundant chip definitions from Kconfig 2020-08-31 11:49:49 -03:00