Commit Graph

12437 Commits

Author SHA1 Message Date
Mateusz Szafoni
58c3ee65e7 nrf52 improvements
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle on .c and .h files and fix it

Author: raiden00pl <raiden00pl@gmail.com>

    arch/arm/src/nrf52: use the same naming convention for register defs

    arch/arm/src/nrf52/hardware/nrf52_ficr.h: remove invalid defs

    arch/arm/src/nrf52/hardware: add TIMER register defs
2020-01-15 11:43:36 -03:00
Nathan Hartman
72a0934bcc arch/arm/include/cxd56xx/audio.h: Fix minor typos 2020-01-14 20:57:29 -03:00
Daniel P. Carvalho
bf5d48acac Add SPWM example to test STM32L4 PWM driver low level operations
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle again .c file and fix error message

Author: Daniel P. Carvalho <danieloak@gmail.com>

    Add SPWM example to test STM32L4 PWM driver low level operations.

    Fix BUGs.
2020-01-14 11:53:26 -03:00
patacongo
f00569816f Fix a few errors concerning use of section block comments in .c files: (#95)
1. No .c file should include a "Public Types" section.  Only a header file can define a public type.  A .c file can only define a private type.  Several files contained private type definitions.  The section that they were defined in, however, was incorrectly named "Public Types."  Those were easilty changed to "Private Types" which is what they are.

2. No .c file should include a "Public Function Prototypes" section.  All global function prototypes should be provided via a header file and never declared with a .c file.

For No. 2, I corrected as many cases as was reasonable for the time that I had available.  But there are still a dozen or so .c files that declare "Public Function Prototypes" within a .c file.  This is bad programming style.  These declarations should all be moved to the proper header files.
2020-01-14 00:37:54 +01:00
Daniel P. Carvalho
bd0fe25418 Fix small typo error. (#91) 2020-01-13 18:39:56 +01:00
Xiang Xiao
b96d0bfb70 arch/stm32 ensure all spi dma handler check the result
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle on .c files and fix the issues

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    arch/stm32 ensure all spi dma handler check the result

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-11 09:56:52 -03:00
Adam Feuer
237c0cca09 CDC ECM Ethernet over USB High Speed for SAMA5D36-Xplained #68
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle against .c .h files and fix it

Author: Adam Feuer <adam@starcat.io>

Summary

    Adds CDC ECM Ethernet over USB High Speed for SAMA5D36-Xplained
      (and maybe other boards) (most of the code was there already,
      but didn't work out of the box for the SAMA5D36-Xplained)
    Only SAMA5D36-Xplained has been tested so far

Impact

    None if you don't use the CDC ECM Ethernet driver
    On SAMA5D36-Xplained, this adds high-speed Internet connectivity
      over USB 2.0 High Speed. via the USB CDC ECM Gadget driver.
    It may work on other boards too.
    This also fixed full-speed (low-speed) mode for the board too.

Limitations

    Hasn't been tested on anything other than SAMA5D36-Xplained board.

TODO

    Ideally this would include a composite RNDIS device so it would
      also work seamlessly on Windows. That is for a future PR
    Ideally this would include software to help configuration via
      mDNS/DNS-SD for plug and play compatibility with Linux and macOS.
      That is for a future PR.

Detail

    Only a few lines of C driver code needed to be changed, since the
      capability was there already. The rest is config and documentation.
    Changes the SAMA5D3-Xplained board bringup to match the SAMA5D3-EK
      board bringup
    A helper script to configure Linux routing and iptables NAT is also
      provided, along with documentation on how to use it.

Testing

    Manual, on a Ubuntu Linux 19.10 system and MacOS 10.14.6 Mojave
      MacBook Pro.

How To Verify

    Follow the new CDC ECM Ethernet over USB instructions in the board
      README.txt file

Commits:

    remove non-UTF-8 chars in comment and reformat

    removed unneeded comment markers

    instructions for using the defconfigs

    removed EMAC from config

    - to prove this example only needs the CDC ECM Ethernet over USB to work

    added CDC-ECM Ethernet over USB info to README

    added U-Boot image

    added netusb helper script

    - this can configure the Linux network interface and routes
      so you can ping or access the NuttX system via TCP/IP.

    renamed defconfig dirs to be ethernet-over-usb

    - was usb-over-ethernet which is not right

    added USB DMA to defconfigs

    updated readme with autoboot and debugging info

    bringing ethernet-over-usb examples into parity

    added cdc ecm ethernet over usb with telnetd config

    added defconfig

    only use phy interrupt if netdevices is ethernet

    - because now netdevice could be CDC ECM ethernet over usb
      which has no PHY interrupt

    add bringup to Makefile

    add bringup

    app init cleanup

    init cdc ecm driver and rndis driver; some cleanup

    fixed some typos and odd characters

    usb over ethernet working over usb 2.0 hs
2020-01-10 07:13:37 -03:00
Daniel P. Carvalho
bac282ecbf boards/arm/stm32l4/nucleo-l432kc/: Remove LPTIM1/2 duplicated entrys on Timer Configuration Menu. Timers TIM3, TIM4, TIM5, TIM8 and TIM17 are not available on STM32L432KC. Added support for timers LPTIM1/2. 2020-01-09 15:22:48 -06:00
liuzhao
dc5d8f7c44 Add Quectel EC20 4G LTE Module USB CDC/ACM support
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle to check .c and .h files and fix reported issues

Author: liuzhao <happypapa@yeah.net>

    Add Quectel EC20 4G LTE Module USB CDC/ACM support
2020-01-09 08:00:05 -03:00
Gregory Nutt
8803f5e784 arch/arm/src/cxd56xx/cxd56_sdhci.c: Fix errors found in build testing. Aggressive changes to conform to coding standard introduce compilation errors. More would be requires to fix the CamelCase naming in this case. 2020-01-08 14:04:54 -03:00
raiden00pl
f51e478ad8 nrf52: add support for SPI
nrf52: add support for GPIO interrupts

nrf52: add macros to decode GPIO PIN and GPIO PORT

nrf52: various cosmetic changes

nrf52: fix GPIO P1 memory address

boards/nrf52840-dk: add support for SPI

boards/nrf52840-dk: add support for LSM6DSL sensor

boards/nrf52840-dk: add support for SX127X radio
2020-01-08 09:05:03 -06:00
Björn Brandt
38b043da9f arch/arm/src/stm32f7/: Apply fix introduced by 0947b31fbb for STM32F7[6/7]XX to STM32F7[2/3/4/5]XX.
In RCC configuration, STM32_RCC_DCKCFGR2 has nothing to do with PLLI2S; PLLI2S is not dependent on LTDC, instead on SAICLK1/2 generated from PLLI2S
2020-01-08 07:11:59 -06:00
Alin Jerpelea
3e45517599 Fix buffer overrun and memory leak on smartfs and improvement to cxd56xx
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Check all .c and .h against nxstyle and fix it.

Author: Alin Jerpelea <alin.jerpelea@sony.com>

    fs: smartfs: Fix over capacity write

    When the remaining capacity of flash is one sector, if a new root
    directory is created by file open, then the root directory's chain is
    broken and it causes to SmartFS filesystem crash. Once this fatal
    problem occurs, it's impossible to recover even if the system reboot.
    Fix it by finally update link of root directory.

    fs: smartfs: Fix buffer overrun

    fs: smartfs: Fix uninitialized variable warnings

    fs: smartfs: Memory leak fix

    boards: cxd56xx: Update spresense board.h

    - Fix PMIC assignment
    - Add specific pin configurations for spresense
    - Remove unnecessary definitions

    arch: cxd56xx: Add ITM syslog init at startup

    arch: cxd56xx: Enable DMA settings dynamically
2020-01-08 07:51:11 -03:00
Alin Jerpelea
15eddd29c8 cxd56xx improvements (#48) and various other fixes (#49)
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Verify all .c and .h against nxstyle, fixed the Mixed cases

Author: Alin Jerpelea <alin.jerpelea@sony.com>

    cxd56xx improvements (#48)

    * arch: cxd56xx: Add size limitation for I2C SCU xfer

    This is a fw restriction, unroll loop because it can be transfer
    up to 16 bytes.

    * arch: cxd56xx: Fix lack of leave_critical_section

    add the missing leave_critical_section

    * arch: cxd56xx: Remove unnecessary file

    this header is duplicate and we can remove it

    * arch: cxd56xx: Cosmetic change

    remove space after function

    * arch: cxd56xx: update topreg registers

    the topreg registers are updated to match the cxd5602 HW

    * arch: cxd56xx: Add voltage setting for low battery notification

    Add voltage setting for low battery notification

    * arch: cxd56xx: Improve perfomance of SD card

    Improve a problem that the clock of SD Host Controller is lower than the
    expected value in SDR25 transfer mode.

    * arch: cxd56xx: Cosmetic changes

    cleanup to comply with coding standard

    * boards: cxd56xx: Cosmetic changes

    updates to comply with coding standard

    * boards: cxd56xx: Fix SD card cannot mount issue

    SD card cannot mount when connecting and disconnecting three times
    or more due to wrong state of parameter 'initialized'.

    This change enables to skip swtching initialized state when mount
    failed.
2020-01-07 18:29:52 -03:00
Alin Jerpelea
077ef70b0c cxd56xx improvements (#48)
* arch: cxd56xx: Add size limitation for I2C SCU xfer

This is a fw restriction, unroll loop because it can be transfer
up to 16 bytes.

* arch: cxd56xx: Fix lack of leave_critical_section

add the missing leave_critical_section

* arch: cxd56xx: Remove unnecessary file

this header is duplicate and we can remove it

* arch: cxd56xx: Cosmetic change

remove space after function

* arch: cxd56xx: update topreg registers

the topreg registers are updated to match the cxd5602 HW

* arch: cxd56xx: Add voltage setting for low battery notification

Add voltage setting for low battery notification

* arch: cxd56xx: Improve perfomance of SD card

Improve a problem that the clock of SD Host Controller is lower than the
expected value in SDR25 transfer mode.

* arch: cxd56xx: Cosmetic changes

cleanup to comply with coding standard

* boards: cxd56xx: Cosmetic changes

updates to comply with coding standard

* boards: cxd56xx: Fix SD card cannot mount issue

SD card cannot mount when connecting and disconnecting three times
or more due to wrong state of parameter 'initialized'.

This change enables to skip swtching initialized state when mount
failed.
2020-01-07 11:21:58 -03:00
脚蹬破拖鞋
0b3dac2c33 Author: Gregory Nutt <gnutt@nuttx.org>
Run all .c and .h files in last PR through nxstyle.

Author: 脚蹬破拖鞋 <happypapa@yeah.net>

    Add Imxrt usdhc insert or remove detection (#43)

    * Add usdhc card insertion and removal detection using interrupt for imxrt.
    * Add interrupt handle when usdhc insert or remove.
2020-01-06 20:49:17 -06:00
patacongo
5d5897c309
Merge pull request #41 from wingunder/wingunder_fix_compilation_bug_irq_f7_h7
Fixed a compilation error, with irq debugging for stm32f7 and stm32h7 archs.
2020-01-05 16:07:20 -06:00
Pieter du Preez
00df2f0fe2 Fixed a compilation error, with irq debugging for stm32f7 and stm32h7 archs.
This commit fixes a compilation error that occurs when enabling the
following configuration items for stm32f7 and stm32h7 architectures:

   CONFIG_DEBUG_FEATURES=y
   CONFIG_DEBUG_ERROR=y
   CONFIG_DEBUG_WARN=y
   CONFIG_DEBUG_INFO=y
   CONFIG_DEBUG_IRQ=y
   CONFIG_DEBUG_IRQ_ERROR=y
   CONFIG_DEBUG_IRQ_WARN=y
   CONFIG_DEBUG_IRQ_INFO=y

The compiler error for stm32f7:

make[1]: Entering directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'
CC:  chip/stm32_irq.c
chip/stm32_irq.c: In function 'up_irqinitialize':
chip/stm32_irq.c:497:29: error: 'STM32_IRQ_NIRQS' undeclared (first use in this function); did you mean 'STM32_IRQ_FIRST'?
   stm32_dumpnvic("initial", STM32_IRQ_NIRQS);
                                ^~~~~~~~~~~~~~~
                             STM32_IRQ_FIRST
chip/stm32_irq.c:497:29: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:172: stm32_irq.o] Error 1
make[1]: Leaving directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'

And the compiler error for stm32h7:

make[1]: Entering directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'
CC:  chip/stm32_irq.c
chip/stm32_irq.c: In function 'stm32_dumpnvic':
chip/stm32_irq.c:164:4: warning: #warning Missing logic [-Wcpp]
 #  warning Missing logic
     ^~~~~~~
     chip/stm32_irq.c: In function 'up_irqinitialize':
     chip/stm32_irq.c:522:29: error: 'STM32_IRQ_NIRQS' undeclared (first use in this function); did you mean 'STM32_IRQ_CRS'?
        stm32_dumpnvic("initial", STM32_IRQ_NIRQS);
                                     ^~~~~~~~~~~~~~~
                                  STM32_IRQ_CRS
chip/stm32_irq.c:522:29: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:172: stm32_irq.o] Error 1
make[1]: Leaving directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'

This commit replaces all STM32_IRQ_NIRQS defines with the NR_IRQS
define, which seems to be consistent with the rest of the code in
Nuttx.
2020-01-05 21:24:16 +00:00
Minamiya_Natsuki
390ebd504f arch/arm/src/stm32h7: Port QSPI driver from STM32F7 to STM32H7 2020-01-05 07:45:30 -06:00
Mateusz Szafoni
9e091d2027 Improvements for NRF52 (#37)
Author: Alan Carvalho de Assis <acassis@gmail.com>
        Fix long line comments in the header files

Author: Mateusz Szafoni <raiden00pl@users.noreply.github.com>

    * arch/arm/src/nrf52: add GPIOTE and SAADC registers definitions

    * arch/arm/src/nrf52: update some registers definitions

    * arch/arm/src/nrf52: add basic I2C support

    * arch/arm/src/nrf52: add function to unconfigure GPIO

    * arch/arm/src/nrf52/nrf52_lowputc: add missing FAR
2020-01-04 09:44:00 -03:00
Xiang Xiao
d612fd3dc5 Squashed commit of the following:
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run all .h and .c files modified in last PR through nxstyle.

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    Fix stm32l4_otgfshost.c: error: 'ret' undeclared (#32)

    result by commit 6a3c2aded6

    Change-Id: I68ba79417d8da102da8d91c74496961aef242dd9
    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-03 11:38:02 -03:00
jjlange
0ee8241606 Author: Gregory Nutt <gnutt@nuttx.org>
Run all .c and .h files in last PR through tools/nxstyle and fix all complaints.

Author: macman88 <jjlange91@gmail.com>

    LPC17xx serial updates (#29)

    * Save CONFIG_ARCH_BOARD_CUSTOM when running 'make savedefconfig'
    * Don't compile up_earlyserialinit if USE_EARLYSERIALINIT is not defined
    * Added support for RS485 direction control on LPC17xx UART1
    * First pass at fractional baud rate divider on LPC17xx/40xx
    * Added support for fractional divider to console UART
2020-01-02 15:56:27 -06:00
Mateusz Szafoni
065ec87a05 arch/arm/src/stm32/stm32_fmc.c: fix compilation error (#27)
arch/arm/src/stm32/stm32_fmc.c:  Missing semicolons caused compilation errors.
2020-01-02 13:48:03 -06:00
Gregory Nutt
669dedc62e Squashed commit of the following:
Author: patacongo <spudarnia@yahoo.com>

    arch/arm/src/imxrt/imxrt_enet.c: Fix some warnings found in build testing.

    Also fix coding standard problems reported by nxstyle. (#26)

    Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
2020-01-02 16:43:09 -03:00
jjlange
084f81e76e Author: Gregory Nutt <gnutt@nuttx.org>
Run all .c and .h files in last PR through nxstyle.

Author: macman88 <jjlange91@gmail.com>

    SAME5x Ethernet Support (#25)

     boards/arm/samd5e5/same54-xplained-pro/:  Adds basic support for Microchip SAM E54 Xplained Pro board.
    arch/arm/src/samd5e5/:   Adds an Ethernet driver for the SAME5x family (based on the SAMA5 GMAC driver).
2020-01-02 12:35:45 -06:00
Xiang Xiao
6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Minamiya_Natsuki
2388373aa5 Squashed commit of the following:
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run all .h and .c files modified in last PR through nxstyle.

Author: Minamiya_Natsuki <yukihiratype2@gmail.com>

    Add FMC SDRAM for STM32H7x3 chip (#22)

    * Add FMC SDRAM for STM32H7x3 chip

    * Add FMC SDRAM for STM32H7x7

    * Nuttx Coding Standard requires one declaration per line

    * should be __ARCH_ARM_SRC_STM32H7_STM32_FMC_H

    * fix bad alignment

    * fix typo

    * fix typo

    * people can't live in furture

    * fix comment line length

    * fix more comment line length

    * fix aligenment

    * fix typo
2020-01-02 12:17:16 -03:00
Adam Feuer
3c2fbe3d9c sama3 sam_serial.c USART selection fixes (#13)
arch/arm/src/sama5/sam_serial.c:  uart2port in sam_serial, fix the rest of the uarts in sam_serial
boards/arm/sama5/sama5d2-xult/README.txt:   Fix some minor typos
boards/arm/sama5/sama5d2-xult/include/board.h:  Update UART pin disambiguation with default UARTn_RXD, _TXD
2019-12-31 08:10:46 -06:00
Pieter du Preez
28c8e1444c Fixed STM32L4_NUSART for STM32L433XX. (#9)
STM32L4_NUSART was set to 4. The spec at
https://www.st.com/resource/en/datasheet/stm32l433cc.pdf states the
following on page 1:

   - 4x USARTs (ISO 7816, LIN, IrDA, modem)
   - 1x LPUART (Stop 2 wake-up)

However it on page 49, it states:

   The STM32L433xx devices have three embedded universal synchronous
   receiver transmitters (USART1, USART2 and USART3).

The latter is correct.

This patch sets STM32L4_NUSART to 3.
2019-12-31 07:47:06 -06:00
Pieter du Preez
1db6f929a2 arch/arm/src/stm32l4/Kconfig: Fixed conditional config for STM32L4_STM32L432XX and STM32L4_STM32L442XX archs. The wrong spelling of STM32L4_STM32L432XX and STM32L4_STM32L442XX, caused the following three peripherals to be available although they are not supported by these architectures: USART3, SPI2, and I2C1. These were available for selection in menuconfig and caused compiler errors when selected. This patch replaces the STM32L4_L432XX and STM32L4_L442XX items with STM32L4_STM32L432XX and STM32L4_STM32L442XX. 2019-12-24 15:51:28 -06:00
David Sidrane
eba8eec74b STM32F7 and STM32H7 SDMMC internal pull up usage fixed
Code was flawed in that the Pins are defined with the
    pullups in the definition. Since there are no alterntes pins
    there is no way to remove them. So not enabling the CONFIG
    pull up did nothing as did enabling them.

    Code also ignored the use of D0 for ready detection causing
    3X+ the chatter.

    This is now a compile time feature as there was no reason for
    it to be a run time. It wasted both flash and ram.
2019-12-24 10:52:09 -06:00
Xiang Xiao
87cf5c58ae Correct some problems with network timed events when there are multiple network devices in the configuration.
Squashed commit of the following:

Author: Gregory Nutt <gnutt@nuttx.org>

    Ran nxstyle against many of the affected files.  But this job was too big for today.  Many of the network drivers under arch are highly non-compiant and generate many, many faults from nxstyle.  Those will have to be visited again another day.

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    This effects all network drivers as well as timing related portions of net/: devif_poll_tcp_timer shouldn't be skipped in the multiple card case.  devif_timer will be called multiple time in one period if the multiple card exist, the elapsed time calculated for the first callback is right, but the flowing callback in the same period is wrong(very short) because the global variable g_polltimer is used in the calculation.  So let's pass the delay time to devif_timer and remove g_polltimer.
2019-12-24 10:37:30 -06:00
David Sidrane
9b7afcdfe5 imxrt106x:pinout add ALT 8 GPIO_GPT2_COMPARE3 & fix GPIO_GPT1_CAPTURE[1|2] 2019-12-21 02:54:50 -08:00
David Sidrane
3dcd238d5e imxrt:lpi2c Fix interrupt storm on failed write.
The SDF was not acked if ther was an error
   on the last write.
2019-12-21 02:54:50 -08:00
David Sidrane
0050ba9ac7 imxrt:lpi2c ensure that on an error status reflects it.
After an error the STOP detect was overwriting the
   previous error status.
2019-12-21 02:54:50 -08:00
David Sidrane
9ebeaa1d53 imxrt:lpi2c imxrt_lpi2c_reset uses GPIO with SION
Reworked imxrt_lpi2c_reset to use GPIO because the IO
   can not be mapped from a peripheral to a GPIO with
   simple bit logic.
2019-12-21 02:54:50 -08:00
David Sidrane
f297e41219 imxrt:gpio Support readback on OUT GPIO
imxrt:gpio ran through nxstyle
2019-12-21 02:54:44 -08:00
Guillherme Amaral
eeed40aa0c arch/arm/src/stm32f0l0g0/ and boards/arm/stm32f0l0g0/nucleo-g070rb/include/board.h: Add I2C pinmap. In Kconfig select I2C2 for this part. Update I2C pin definitions in board.h. 2019-12-20 13:02:13 -06:00
raiden00pl
d80d6b8774 Merged in raiden00/nuttx_nrf52 (pull request #1098)
nrf52 updates

arch/arm/nrf52: add more options to Kconfig

arch/arm/nrf52: cosmetics changes to some files

arch/arm/nrf52: nfct, radio, twi, spi registers definitions

arch/arm/nrf52: fix warnings in nrf52_gpio.c

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-19 15:40:56 +00:00
Gregory Nutt
e7c9c89985 Trivial updates to files modified in last PR based on results of tools/nxstyle. 2019-12-16 13:13:04 -06:00
raiden00pl
a0429bcb20 Merged in raiden00/nuttx_nrf52 (pull request #1096)
nrf52 updates

board/arm/nrf52/nrf52832-dk: use the on-board virtual COM pins as default UART0 configuration

board/arm/nrf52: initial support for the nrf52840-dk board

board/arm/nrf52: initial support for the nrf52840-dk dongle board

arch/arm/src/nrf52: add support for port 1 GPIO

arch/arm/src/nrf52: initial support for UART1

arch/arm/src/nrf52: add UICR definitions

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-16 18:35:45 +00:00
Valmantas Palikša
bc7566a83f arch/arm/include/armv7-m/syscall.h: ARM EABI specifies that the stack should be aligned by 8 on function calls, inside the function is not required to be aligned by 8. Since these functions call svc, compiler doesn't know that the svc is a function, therefore it does not do any stack management. This change pushes an even number of args to the stack and maintains an 8 byte alignment. I've checked the assembly and it doesn't cause any more overhead that the hand written assembly. 2019-12-16 09:10:08 -06:00
Gregory Nutt
6bff1f4df4 arch/arm/include/samd2l2/sam_adc.h: I was wrong... this header file does belong in the samd2l2 include directory. It contains IOCTL definitions that are needed by applications. Usage of a chip-specific header file is, however, not really a good portable design because it requires that the application know that it is running on a specific chip. But still, if we are going to do that, the include directory is where the header file belongs. My apologies for the bad judgement. 2019-12-16 03:53:05 -06:00
Alan Carvalho de Assis
787128930f arch/arm/src/samd2l2 and boards/arm/samd2l2/arduino-m0: Add support to SAMD2L ADC driver and board support to Arduino M0. 2019-12-15 17:36:59 -06:00
Petro Karashchenko
871197b4ec arch/arm/src/am335x/ and boards/arm/am335x/beaglebone-black/: Initial CAN support for the BBB. 2019-12-15 17:12:54 -06:00
Petro Karashchenko
ca4e6077e2 arch/arm/src/am335x/am335x_i2c.c: Improvements to AM335x I2C. 2019-12-15 17:02:59 -06:00
David Sidrane
2cbcb8fd00 arch/arm/src/imxrt/imxrt_clockconfig.c and board.h: Allow clock setting for SPI and I2C from board.h. 2019-12-12 08:33:05 -06:00
David Sidrane
42dfd18d7c arch/arm/src/imxrt/imxrt_lpspi.c: Fixed race on register setting. The ouput frequency was not being initialized correctly. The value of LPSPI_TCR_PRESCALE was getting set to 7. Making the setting atomic fixed the race. I suppose a DSB() could have also fixed it. 2019-12-12 08:31:24 -06:00
David Sidrane
587dcaa6e6 arch/arm/src/imxrt/imxrt_lpspi.c: Remove hack setting LPSPI1 daisy irrespective of pin config. I assume this hack pre dated the addition of the dasiy chain setting. It was forcing LPSPI1 pins to read from selection 1 irrespective of pin config. The correct input selection is done in imxrt_config_gpio. 2019-12-12 08:29:08 -06:00
David Sidrane
3d4eb32e48 arch/arm/src/imxrt/imxrt_lpi2c.c: Added configurations to fine tune LPI2C Timeouts. 2019-12-12 08:27:02 -06:00
Nathan Hartman
9655730ef8 Fix various typos and spelling errors. 2019-12-12 07:41:51 -06:00
Petro Karashchenko
3737aa83fa arch/arm/src/am335x/am335x_i2c.c: AM225x I2C driver now works in both polling and interrupt modes. 2019-12-12 07:39:36 -06:00
Juha Niskanen
c8268cbfcf Merged in juniskane/nuttx-4/Juha-Niskanen/remove-reference-to-nonexistent-config-m-1575888266268 (pull request #1093)
Remove reference to nonexistent config macro. stm32l4_spi.h edited online with Bitbucket

stm32l4_spi.h edited online with Bitbucket

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-11 12:06:03 +00:00
Juha Niskanen
50768ac7a6 Merged in juniskane/nuttx-3/Juha-Niskanen/kconfig-edited-online-with-bitbucket-1575887906303 (pull request #1092)
Kconfig edited online with Bitbucket

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-11 12:04:20 +00:00
Petro Karashchenko
813902cf87 arch/arm/src/am335x and boards/arm/am335x/beaglebone-black: Add I2C support for AM335X. 2019-12-10 20:22:25 -06:00
Gregory Nutt
425b1c737c Fix a problem I introduced in my recent review. 2019-12-10 18:04:56 -06:00
David Sidrane
2e71e0632f arch/arm/src/imxrt/imxrt_usdhc.c: IMXRT106x USDHC: Support regular GPIO for CD and inversion. 2019-12-10 17:58:08 -06:00
Petro Karashchenko
2f00eefa5d arch/arm/src/am335x: Adds AM335x Clock Configuration. 2019-12-10 17:55:08 -06:00
Gregory Nutt
cb288fdfe2 arch/arm/src/stm32f7/stm32_serial.c: Fix a new warning found in build testing. 2019-12-07 13:14:50 -06:00
David Sidrane
db6fe28fa6 Merged in david_s5/nuttx/master_imxrt_cap (pull request #1089)
imxrt106x:pinout add ALT 8 GPIO_GPT1_CAPTURE[1|2]

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-05 22:32:43 +00:00
David Sidrane
1c05846f92 Merged in david_s5/nuttx-5/David-Sidrane/archarmsrcstm32f7stm32_serialc-fix-typo-1575381167793 (pull request #1087)
arch/arm/src/stm32f7/stm32_serial.c:  Fix typo in UART7

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-03 14:25:08 +00:00
David Sidrane
92a3a8e026 arch/arm/src/stm32f7/stm32_serial.c: Serial nxsyle fixes (sans long table lines). 2019-12-03 07:23:14 -06:00
David Sidrane
baeaf54c6c arch/arm/src/stm32f7/stm32_serial.c: Add Tx U[S]ART DMA. 2019-12-03 07:21:58 -06:00
David Sidrane
d3e0d5ee72 arch/arm/src/stm32f7/stm32_serial.c: CONFIG_USART_DMAPRIO->CONFIG_USART_RXDMAPRIO. 2019-12-03 07:18:42 -06:00
David Sidrane
b095ab392c arch/arm/src/stm32/stm32_serial.c: SERIAL_HAVE_DMA->SERIAL_HAVE_RXDMA. 2019-12-03 07:15:59 -06:00
David Sidrane
fe12b843d0 arch/arm/src/stm32/stm32_hciuart.c: CONFIG_STM32_HCIUART_DMAPRIO->CONFIG_STM32_HCIUART_RXDMAPRIO. 2019-12-03 07:14:30 -06:00
David Sidrane
bbdc6875de arch/arm/src/stm32l4/stm32l4_serial.c: SERIAL_HAVE_DMA->SERIAL_HAVE_RXDMA. 2019-12-03 07:11:54 -06:00
Gregory Nutt
f4102b7d6e arch/arm/src/stm32f0l0g0/stm32_serial_v1.c: SERIAL_HAVE_DMA->SERIAL_HAVE_RXDMA. 2019-12-03 07:10:26 -06:00
David Sidrane
64d956e7a1 arch/arm/src/stm32l4/stm32l4_serial.c: CONFIG_USART_DMAPRIO->CONFIG_USART_RXDMAPRIO. 2019-12-03 07:08:56 -06:00
David Sidrane
e35325e385 arch/arm/src/stm32f0l0g0/stm32_serial_v1.c: CONFIG_USART_DMAPRIO->CONFIG_USART_RXDMAPRIO 2019-12-03 07:07:49 -06:00
Guillherme Amaral
15f358d6a9 arch/arm/src/stm32f0l0g0: Fix PWM on TIM16 not working: Adjust TIM registers, Add pins available for mapping TIM14-17, CCMR2 registers was being handled for TIMs who do not have it, and Fix PWM frequency being doubled when in center-aligned mode. 2019-12-02 09:14:56 -06:00
OSer
1e2c840752 Merged in OSer916/nuttx/fix_stm32l4_sai (pull request #1083)
boards/arm/stm32f7/stm32f746g-disco: add SAI driver

* ignore TAGS

* arch/arm/src/stm32l4/stm32l4_sai.c: fix type error

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-02 14:22:58 +00:00
Valmantas Palikša
cc0a0e7aa9 arch/arm/src/armv7-m/up_schedulesigaction.c: Correct hardfault that can occur when killing a task via Ctrl-C in PROTECTED mode. 2019-12-02 08:16:34 -06:00
Gregory Nutt
736a0da8ec Fix various coding standard problems in last PR, mostly as reported by tools/nxstyle. 2019-12-01 20:17:57 -06:00
OSer
498fb6d15f Merged in OSer916/nuttx/stm32f746g-disco_sai (pull request #1081)
boards/arm/stm32f7/stm32f746g-disco: add SAI driver

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-02 01:55:29 +00:00
Guillherme Amaral
74883ddd97 arch/arm/src/stm32f0l0g0/stm32_pwm.c: Add missing logic for PWM stop for TIM14-15. 2019-11-30 15:36:41 -06:00
Guillherme Amaral
d022b56b84 arch/arm/src/stm32f0l0g0/Kconfig: Select STM32F0L0G0_PWM when TIM{14-17}_PWM enabled. 2019-11-30 15:34:00 -06:00
Gregory Nutt
108ffe7044 Within the OS, nxisg_sleep() should be used instead of sleep(). sleep() is a cancellation point and sets the errno value. Neither of which should be done inside the OS. 2019-11-29 19:03:24 -06:00
Gregory Nutt
4f1d891067 arch/: Within the OS, nxisg_usleep() should be used instead of usleep(). usleep() is a cancellation point and sets the errno value. Neither of which should be done inside the OS. 2019-11-29 17:54:43 -06:00
David Sidrane
43a6e43a0f arch/arm/src/stm32f7/stm32_ethernet.c: Add some delays so that ifup() does not hog the CPU. 2019-11-29 17:19:06 -06:00
Gregory Nutt
69318b1024 Re-implements reverted commit 344f7bc9f6 in a way that should not have the undesired side-effect. include/nuttx/sched.h: Add a bit to the TCB flags to indicat the thread is a user thread in a syscall. sched/nuttx/nxsig_dispatch.c: Delay dispatching to signal handlers if within a system call. In all syscall implementations: Process delayed signal handling when exiting system call. 2019-11-28 12:47:36 -06:00
Gregory Nutt
cbdd590c82 Revert "include/nuttx/sched.h: Add storage for a previous signal mask. arch/: In all syscall implementations, block all signals before dispatching a system call; resotre signal mask when the system call returns."
Using the sigprocmask() for this purpose has too many side-effects.

This reverts commit 344f7bc9f6.
2019-11-28 11:57:54 -06:00
Gregory Nutt
344f7bc9f6 include/nuttx/sched.h: Add storage for a previous signal mask. arch/: In all syscall implemenations, block all signals before dispatching a system call; resotre signal mask when the system call returnes. 2019-11-28 10:51:29 -06:00
Beat Küng
fe49dcf622 Merged in bkueng/nuttx/fix_h7_dmamux_defines (pull request #1079)
fix stm32h7x3xx_dmamux.h: add missing underscore to defines

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-28 12:23:20 +00:00
kyChu
01cda09aba Merged in kyChuGit/nuttx (pull request #1077)
STM23L4 LPTIM PWM support with multi-channel

* arch/arm/src/stm32l4/stm32l4_pwm.c:
        fixed some bugs
    arch/arm/src/stm32l4/stm32l4_pwm.h:
        support LPTIM PWM if PWM multi-channel is selected
        Channel mode for LPTIM are not available

* arch/arm/src/stm32l4/Kconfig:  add new configuration for STM32L4 LPTIM support

* arch/arm/src/stm32l4/stm32l4_pwm.c:  fix warning: resetbit may be used uninitialized

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-27 13:45:41 +00:00
Dave Marples
c2211d8d3c arch/arm/src/imxrt/imxrt_lowputc.c: This commit removes a largely redundant check in the imxrt lowputc code which will speed it up a little.
I did suspect that it was just about possible that there's a use for this check (specifically, when you're changing serial the clock immediately after the character is sent) but since we're only testing that the character has left the holding register and not that it's actually been sent to line I don't think it's valid even for this case.
2019-11-26 17:45:23 -06:00
Dave Marples
7f56da62f1 arch/arm/src/imxrt: This commit fixes the clock configuration for the imxrt family. This allows WFI to be re-enabled. It also adds a few wait-for-sync loops which are necessary according to the specification but which weren't in the code. It's possible I've added a more than are strictly needed, but for this I figure erring on the side of caution is the right thing to do. 2019-11-26 17:41:54 -06:00
Gregory Nutt
c86fabb9b2 STM32 F4 LPTIM: Cosmetic changes from application of tools/nxstyle to all files modified in last PR. 2019-11-25 08:04:45 -06:00
kyChu
e423e15a56 Merged in kyChuGit/nuttx (pull request #1076)
stm32l4 peripheral driver update

* arch/arm/src/stm32l4/hardware/stm32l4_spi.h:  change the spi speed limitation to 40MHz.

* arch/arm/src/stm32l4/stm32l4_lptim.c:  clear the warning message of "-Wundef".

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-25 14:01:39 +00:00
Gregory Nutt
f691d774cc STM32 F7 SDMMC: Cosmetic changes from application of tools/nxstyle to all files modified in last PR. 2019-11-25 08:00:45 -06:00
OSer
56f8af5db3 Merged in OSer916/nuttx/stm32f746g_disco_sd_card (pull request #1075)
Stm32f746g disco sd card

* arch/arm/src/stm32f7/stm32_sdmmc.c: fix compile error

* boards/arm/stm32f7/stm32f746g-disco: add SD/TF Card Support

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-25 13:54:45 +00:00
Gregory Nutt
27b6132601 Run files changed in last PR through tools/nxstyle, fix several coding standard violations. 2019-11-21 07:50:37 -06:00
OSer
e1f904c943 Merged in OSer916/nuttx/stm32f746g-disco-n25q (pull request #1074)
stm32f746g-disco board add n25q128 support

* arch/arm/src/stm32f7/hardware/stm32f74xx75xx_pinmap.h: fix QSPI pin
    config.

* arch/arm/src/stm32f7/stm32_qspi.c: fix gpio_dumpgpioconfig() function,
    fix qspi_command() function

* boards/arm/stm32f7/stm32f746g-disco/README.txt: fix board path

* boards/arm/stm32f7/stm32f746g-disco: add n25q128 function

* boards/arm/stm32f7/stm32f746g-disco/scripts/Make.defs: use st-flash tool to write fireware on Linux

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-21 13:39:45 +00:00
kyChu
03a47a5fbd Merged in kyChuGit/nuttx/driver_update (pull request #1073)
Driver update

* drivers/mtd/Make.defs:  Add MTD driver for QuadSPI-based Winbond NOR FLASH

* stm32l4/stm32l4_qspi.c:  the "QSPI_DMA_PRIO" has been defined above

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-21 12:10:49 +00:00
Lwazi Dube
25aa695a35 Reviewed by David Sidrane.
boards/arm/stm32h7/stm32h747i-disco:  Remove references to nucleo in the stm32h747i-disco board.
arch/arm/include/stm32h7, arch/arm/src/stm32h7, and boards/arm/stm32h7/stm32h747i-disco:  Add support for the STM32H747I-DISCO board.
2019-11-18 14:03:38 -06:00
Xiang Xiao
8f05cc560b arch/arm/include/setjmp.h: Add prototypes for setjmp/longjmp functions. 2019-11-17 08:48:17 -06:00
Dave Marples
b49b07cb75 rch/arm/src/imxrt/imxrt_serial.c: o, just to complete the documentation of this...it looks like two issues, which confused me greatly;
1) Operational issue

TC (Transmission complete) and TDRE (TX Buffer Empty) were transposed in imxrt_serial.c.  The end result was that for unoptimised code everything worked fine, but optimised code got itself into a real mess and continually fired interrupts.  The patch attached fixes this. This one would have been found much more quickly if this particular board had supported SWO :-/

2) Startup issue

There are a number of chip errata that apply to the 1052 first revision (A-suffix) that don't apply to the second (B-suffix). Those got me for a while and it's important to use an EVK_B_ dev board if you're suffering stability problems with this particular chip. However, even with that resolved with either optimised or unoptimised code when there is no SNVS (Battery Backup) power and the power is switched on the CPU appears to boot but gets stuck with timer interrupts not being generated. The CPU is running and it will execute linear code.   I have determined this by putting an 'imxrt_lowputc('A'+irq)' into up_doirq. For the non-running case the output looks like this;

LLLL

this implies 4 0x0b interrupts have been generated, and nothing else. If I hit keys on the keyboard I get 'e' in the flow.  0x0b is the SVC instruction and is the mechanism by which NuttX handles task switching.  'e' is 0x24, which corresponds to the LPUART1 interrupt.  Other than these, the system does not respond further but is happily in the idle loop.  In this circumstance if you hit SW2 on the EVKB board though the logjam 'unjams' and normal service is established, output now looks like;

LLLLPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPLPP ...etc.

Where 'P' is 0x0f (the SYSTICK interrupt)....this is what _should_ be happening so; SYSTICK starts up after SW2 has been pressed.

From this point on everything works correctly and you can reboot the CPU, put new code into it or do whatever you wish, **provided power is not cycled off**. If power is cycled off then return to the top and go through the process again.

When there is SNVS power to the CPU then power can be switched on and off as you wish, and the CPU will boot correctly. This has been determined by putting 3V onto J6.

I think we are probably doing something naughty with the way we are starting the clocks to the timers.  There are certainly some restrictions on imxrt clock manipulation which we have studiously avoided. I am investigating further and have some potential patches but even if I find the root cause it should not be included in 8.2 as the change could be disruptive.
2019-11-12 09:05:25 -06:00
Dave Marples
2ba7ce75d7 arch/arm/src/imxrt/imxrt_idle.c: Y'all remember that conversation we had about why WFI might have been disabled on imxrt? Well, looks like we found the reason;
https://github.com/zephyrproject-rtos/zephyr/pull/8535/commits:  "The imxrt1050 is configured to use SYSTICK for the kernel timer, but SYSTICK cannot wake up the soc from low-power modes. Disable low-power modes on this soc until we have support for an alternative timer."

    "This fixes k_sleep on the EVKB version of the mimxrt1050_evk board. An earlier version of the board (EVK, not EVKB), had A0 silicon which by default did not enter low-power mode on a wfi."

This patch reverts the WFI enable for further investigation post 8.2.  With this patch in place together with the previous one my system is fully stable(*), just drinking a bit more power than I'd like.
2019-11-12 08:52:21 -06:00
David Sidrane
19015f7e26 Merged in david_s5/nuttx/px4_firmware_nuttx-8.1+_siglewire (pull request #1070)
single wire Allow selection of pull{up|down|none}

* tioctl:Allow selection of pull{up|down|none}

* stm32:Single Wire add pull{up|down|none} tioctl

* stm32f0l0g0:Single Wire add pull{up|down|none} tioctl

* stm32f7:Single Wire add pull{up|down|none} tioctl

* stm32h7:Single Wire add pull{up|down|none} tioctl

* stm32l4:Single Wire add pull{up|down|none} tioctl

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-10 12:27:47 +00:00
Dave Marples
4835c4c017 i.MXRT 106x: pinmux change sof the 1060's. 2019-11-08 18:20:14 -06:00
Dave Marples
aedccfc940 arch/arm/src/imxrt/imxrt_enet.c: Improve naming of Ethernet pins. 2019-11-08 17:33:37 -06:00
Dave Marples
b10737864f boards/arm/imxrt/imxrt1020-evk: Add support for the MIMXRT1021-EVK board. It features nsh, netnsh and usdhc sample configurations. 2019-11-08 17:18:01 -06:00
Dave Marples
15c2951c0d This commit, initially for the imxrt1050, separates out the pinmux and iomux functions cleanly. For ease of conversion default IOMUX definitions have been added into imxrt_iomux.h. The change effectively does two things;
(1) unifies the iomux definitions - previously some pins had them, and some didn't. This effectively made it impossible to use the pinmuxes without editing the header file in the standard distribution tree.

(2) unifies the pin definitions so that every pin now has a suffix. This makes it *much* easier to see when a pin is in use in your code, because it will always have a definition in your board.h file.

For anyone who is already using this CPU, a couple of small changes are needed to existing code;

In respect of (1) add IOMUX decorators to your pin definitions. You will find defaults in haardware/imxrt_iomux.h. Every pin should have a IOMUX decorator and in general the defaults should be OK. So while previously in your board.h file you might have had;

You will now have;

In respect of (2) you will need to add selectors for any function that previously only had one pinning option. There aren't many of those but LPUART1 is a good example. That just means adding into your board.h something like;
2019-11-08 17:08:48 -06:00
Matias N
93e11dacb8 arch/arm/src/stm32l4/stm32l4_idle.c: (1) Added BEGIN_IDLE()/END_IDLE() to stop call so that we also get notification via LED of the STOP mode, (2) Added the stm32l4_clockenable call as previously discussed, and (3) Added call to pm_changestate() to inform drivers we're back to running after the call to stm32l4_stop() returns. 2019-11-08 17:00:16 -06:00
David Sidrane
2213904cfd Merged in david_s5/nuttx/px4_firmware_nuttx-8.1+_bbsram_mpu (pull request #1069)
STM32H7:Set the BBSRAM memory range to non-cacheable.

* armv7-m:mpu add user peripheral helper

* stm32h7:BBSRAM Exclude BBSRAM from cacheable when CONFIG_ARMV7M_DCACHE

       ST placed the STM32H7 BBSRAM in the SRAM default memory region
       which is cacheable. This commit sets the BBSRAM memory range
       to non-cacheable.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-08 16:17:28 +00:00
Dave Marples
2b8cd24364 arch/arm/src/armv7-m/nvic.h: Add BPIALL register address. 2019-11-08 09:49:41 -06:00
Matias N
853e3e0086 arch/arm/src/stm32l4/stm32l4x6xx_rcc.c: This fix is needed if HSI clock is selected. Otherwise when waking up from STOP mode, the MSI clock is selected instead of the HSI clock. 2019-11-07 14:14:09 -06:00
Nathan Hartman
33898ef551 arch/arm/include/tiva/tm4c_irq.h: Fix wrong IRQ vector number. 2019-11-06 20:43:51 -06:00
Nathan Hartman
3869cfc41d arch/arm/src/tiva/common/tiva_flash.c: Improve tiva_write() (but needs more work!)
arch/arm/src/tiva/common/tiva_flash.c:  Fix several mistakes in
tiva_write() but note that this function needs more work. (1) Fix wrong
use of && when & was intended. (2) Add compile- time warning directive
because according to this function's interface, it is supposed to
support unaligned writes and/or writes of arbitrary numbers of bytes to
FLASH. However, this function does NOT support that at this time. This
needs to be fixed. (3) Fix wrong preprocessor conditional. Was written
to use the 32-word write buffer only for TM4C1294NCPDT. This buffer is
available on all TM4C123 and TM4C129 parts. Now conditioned upon
CONFIG_ARCH_CHIP_TM4C123 or CONFIG_ARCH_CHIP_TM4C129. (4) Add comments
to document the intent of the above preprocessor logic.
2019-11-06 20:35:35 -06:00
Nathan Hartman
71ce894cab arch/arm/src/tiva, arch/arm/include: Add support for Tiva TM4C129ENCPDT. 2019-11-06 16:20:40 -06:00
Gregory Nutt
79a2890ed5 arch/arm/src/stm32h7/stm32_allocateheap.c: Clean up some comments mangled in the last PR. 2019-11-06 13:24:33 -06:00
David Sidrane
1168e4ecea Merged in david_s5/nuttx/master_alloc (pull request #1068)
stm32h7:allocateheap SRAM and SRAM1 are not continuous

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-06 19:20:37 +00:00
Dave Marples
48d1d9d84f arch/arm/src/imxrt/imxrt_serial.c: This commit improves the performance of UART serial ports on the IMXRT by enabling the RX & TX FIFOS and transmission on the holding register being empty (TDRE) rather than transmission being complete (TC). 2019-11-04 11:16:46 -06:00
Xiang Xiao
800e12fc42 arch/: Add rpmsg_serialini() call to every implementation of up_initialize() for rpmsg uart initialization. 2019-11-04 08:11:50 -06:00
David Sidrane
43a3a0f400 Merged in david_s5/nuttx/master_k66_ethernet (pull request #1064)
NXP k66 Ethernet

* Kinetis:Add TJA1100 Phy

* Kinetis:enet.c formated with nxstyle

* net:mii Cleanup TJA1100 Support

      Formating and adding mask and shifts

* net:Kconfig Cleanup formatting

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-30 18:29:54 +00:00
Gregory Nutt
e3665c1fb4 drivers/wireless/ieee80211: Add tools/nxstyle to all of the C files in this directory. 2019-10-29 16:56:24 -06:00
Gregory Nutt
894a108743 arch/arm/src/stm32f7/stm32_otghost.c: OTGFS_EPTYPE_INTR should e OTG_EPTYPE_INTR. 2019-10-29 13:22:45 -06:00
David Sidrane
a0f46118f6 arch/arm/src/stm32l4/stm32l4_sdmmc.c: SDMMC Fix system hang on card eject. 2019-10-29 09:57:42 -06:00
Gregory Nutt
71b0065207 arch/arm/src/stm32h7/stm32_sdmmc.c: SDMMC Fix system hang on card eject. 2019-10-29 09:44:00 -06:00
David Sidrane
24f646a417 arch/arm/src/stm32f7/stm32_sdmmc.c: SDMMC Fix system hang on card eject. 2019-10-29 09:38:02 -06:00
David Sidrane
5d095e00b3 arch/arm/src/stm32/stm32_sdio.c: SDIO Fix system hang on card eject. 2019-10-29 09:37:22 -06:00
Matias N
fd625eaa89 arch/arm/src/stm32l4 and boards/arm/stm32l4/nucleo-l476rg: Add support for LPTIM timers on the STM32L4 as PWM outputs. 2019-10-27 17:21:32 -06:00
Gregory Nutt
ba0afebdcb arch/arm/src/stm32 and boards/arm/stm32/olimex-stm32-p207/src: Fix an error found in build testing. There is not relationship be CONFIG_STM32_USBHOST and CONFIG_USBHOST, yet they they are used interchangably. This means that can (and did) get out of synch causing link time failures. This commit adds logic to select CONFIG_USBHOST when CONFIG_STM32_USBHOST is selected, keeping the two settings syncrhonized. Furthermore, since CONFIG_STM32_USBHOST is the authoritative setting, all ocurrences of CONFIG_USBHOST were replaced with CONFIG_STM32_USBHOST in the architecture code and in this one board code that was producing the error in build testing. 2019-10-27 15:02:56 -06:00
Gregory Nutt
1a0f5dec18 arch/arm/src/stm32l4/stm32l4xrxx_dma.c: Eliminate a new warning found in build testing. 2019-10-25 13:10:40 -06:00
Jussi Kivilinna
267b440f0a Merged in jussi_kivilinna/nuttx/stm32l4r_otgfs (pull request #1063)
stm32l4_otgfs: enable OTGFS for STM32L4+ series

The OTGFS peripheral on stm32l4x6 and stm32l4rxxx reference manual is
exactly the same. This patch also adds missing bits and fixes errors in
stm32l4x5xx and stm32l4x6xx OTGFS register maps.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-25 13:07:15 +00:00
Jussi Kivilinna
49ade3ca72 Merged in jussi_kivilinna/nuttx/stm32l4r_add_dmamux (pull request #1062)
Add DMA support for STM32L4+ series

* Add DMA support for STM32L4+

* stm32l4xrxx_rcc: enable "Range 1 boost" mode if any PLL freq above 80 Mhz

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-25 13:05:56 +00:00
Gregory Nutt
79f46c05d1 arch/arm/src/imxrt/imxrt_lpi2c.c: Fix a warning about an unused local variable. Found in build testing. 2019-10-24 13:52:29 -06:00
Alin Jerpelea
2be1153030 Merged in alinjerpelea/nuttx (pull request #1061)
boards: cxd56xx: spresense: cleanup and new defconfig

* arch: cxd56xx: remove NVIC_SYSH redefinition

    The NVIC_SYSH is already defined in nvicpri.h

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: spresense: configs: enable SPRESENSE_EXTENSION

    Enable high current mode for the Spresense Extension board on all examples
    that have SDCARD support

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: spresense: ifdef SDCARD_TXS02612

    The SD Card TXS02612 port expander is hosted on the Extension board and
    should not be enabled if the extension board is not prezent.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: spresense: configs: increase MQ_MAXMSGSIZE

    This change is needed by the display driver on spresense platform

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: spresense: config: add lcd examples defconfig

    This is a configuration for the basic nx examples

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-24 14:26:02 +00:00
Fabio Balzano
5ca0b57a59 i.MXRT1060-EVK (mostly): Add basic LCD support for the board IMXRT1060-EVK. 2019-10-23 13:17:30 -06:00
David Sidrane
b3ed4b95bf STM32H7 FLASH: Fixed compile error. 2019-10-23 08:03:09 -06:00
Alin Jerpelea
f7af996f1d Merged in alinjerpelea/nuttx (pull request #1059)
boards: cxd56xx: spresense: add board_timerhook function

* boards: cxd56xx: spresense: add board_timerhook function

    in preparation for SDK we muts have a weak board_timerhook function

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: usbhost: add missing endif

    By accident an endif was missing.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: audio: add build barrier

    The audio implementation should not be beuilt if the config
    CONFIG_CXD56_AUDIO is not set.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arch:arm:cxd56xx: add ge2d.h header

    The header is used by imageproc.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-23 13:12:21 +00:00
Gregory Nutt
7dc2b7285e arch/arm/src/s32k1xx/s32k1xx_flashcfg.c: Flash configuration array should be const (although it really does not matter in this context). 2019-10-22 17:44:16 -06:00
David Sidrane
f506e2bd72 Merged in david_s5/nuttx/master_h7 (pull request #1058)
STM32H7:Flash driver and Serious BUG fixes.

* arch/arm/Kconfig:Add ARCH_HAVE_PROGMEM for STM32H7

* stm32h7:Add FLASH progmem support

* stm32h7:pwr add CPUCR & D3CR

* stm32h7:syscfg Add PWRCR

* stm32h7:rcc Properly configure VOS and Flash

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-22 19:49:49 +00:00
Markus Bernet
185557440b STM32H7 Ethernet: Fix ETH_MACMDIOAR_CR_MASK bit mask. 2019-10-21 06:29:13 -06:00
Fabio Balzano
8bfb9a486e boards/arm/imxrt/imxrt1060-evk/src/imxrt_lcd.c: Add support for LCD. Clean up some LCD-related interfaces. 2019-10-20 10:46:21 -06:00
Gregory Nutt
ec298554ff arch/arm/src/s32k1xx/s32k1xx_flashcfg.c: Correct some byte ordering. 2019-10-20 10:15:54 -06:00
Gregory Nutt
1386e70d85 boards/arm: Fix/verify to errors found in build testing. 2019-10-19 15:25:38 -06:00
Gregory Nutt
63d150dcaf arch/arm/src/s32k1xx/Kconfig: Add some help text for the flash configuration fields. 2019-10-19 13:26:53 -06:00
Gregory Nutt
d6b4e90d70 arch/arm/src/s32k1xx: Support configuration and initialization of the flash configuration bytes. boards/arm/s32k1xx/s32k1**evb/scripts/flash.ld: Create a special FLASH section to hold the FLASH configuration bytes. 2019-10-19 13:14:02 -06:00
Gregory Nutt
6f5fadf289 arch/arm/src/stm32/hardware/stm32f40xxx_pinmap.h: ETH_RMII_REF_CLK is an input. 2019-10-18 11:50:12 -06:00
Daniel Pereira Volpato
ca52e33ba9 include/nuttx/timers/pwm.h: Correct some typos. arch/arm/src/stm32f0l0g0: Add PWM support. 2019-10-17 12:00:57 -06:00
Jussi Kivilinna
d45f559d47 arch/arm/src/stm32l4/Kconfig: Add STM32L4R5ZI chip type. 2019-10-17 11:05:50 -06:00
Masayuki Ishikawa
78d68fe8cc Merged in masayuki2009/nuttx.nuttx/fix_cpustart (pull request #1051)
Fix cpustart for Cortex-M SMP

* arch: lc823450: Fix lc823450_cpustart.c

    In Cortex-M, offset 0 in vector table stores initial stack pointer
    and offset 4 stores reset vector.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* arch: sam34: Fix sam4cm_cpustart.c

    In Cortex-M, offset 0 in vector table stores initial stack pointer
    and offset 4 stores reset vector.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-16 03:16:48 +00:00
Gregory Nutt
eeff429939 Fix some trivial spacing issues noted in review of PR. 2019-10-11 23:52:15 +08:00
Alin Jerpelea
716c7c9bee Merged in alinjerpelea/nuttx (pull request #1048)
boards: arm: cxd56xx: audio: add power_control and audio_tone_generator

* boards: arm: cxd56xx: audio: add power_control

    Add a simeple way to control the audio power for userspace apps

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: audio: add audio_tone_generator

    Add a simple way to control the audio buzzer with defined frequency
    for userspace apps

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-11 15:46:15 +00:00
Daniel P. Volpato ‎
0142dd96a2 Add files that were supposed to be included as part of 0d1934a740. 2019-10-11 14:47:53 +08:00
Alin Jerpelea
33d0de4d57 Merged in alinjerpelea/nuttx (pull request #1046)
boards: spresense: add audio implementation

* boards: arm: cxd56xx: add audio implementation

    Add the board audio control implemantation

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: update audio defconfig

    Small updates to build the platforms specific audio driver

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: drivers: add audio implementation

    Add the audio implementation for CXD56XX chip

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: fix Load switch GPIO

    During the initial bringup the grong GPIO was set.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-09 23:55:20 +00:00
Daniel Pereira Volpato
0d1934a740 arch/arm/src/stm32f0l0g0: Support timers available on STM32G070
arch/arm/src/stm32f0l0g0: Pinmap TIM1 GPIOs available for STM32G0
arch/arm/src/stm32f0l0g0: Add TIM driver lowerhalf
arch/arm/src/stm32f0l0g0/stm32_tim_lowerhalf.c:  Handle 32-bit overflow on some calculations.
2019-10-07 22:07:21 -06:00
Daniel Pereira Volpato
8c62600cc1 arch/arm/src/stm32h7/hardware/stm32_tim.h: Fix ATIM_BDTR_BK2P define
arch/arm/src/stm32h7/hardware/stm32_tim.h: Fix ATIM_AF2 bitfields wrongly allocated to ATIM_AF1
arch/arm/src/stm32f7/hardware/stm32f76xx77xx_tim.h: Fix ATIM_AF2 bitfields wrongly allocated to ATIM_AF1
arch/arm/src/stm32h7/stm32_tim.c: Fix some copy'n'paste errors on defines
2019-10-07 21:59:28 -06:00
Xiang Xiao
3bc62f1ccc Change space to tab and help to ---help--- in Kconfig files. 2019-10-05 21:39:12 -06:00
Augusto Fraga Giachero
a6b31e3f03 arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c: Use usleep() instead of up_delay() for large wait times. 2019-10-04 13:01:47 -06:00
Gregory Nutt
6c2f73774b armv7-a and xtensa: Apply Masayuki Ishakawa's change of cef90a3865 to these these other SMP architectures as well. 2019-10-04 07:17:35 -06:00
Masayuki Ishikawa
cef90a3865 Merged in masayuki2009/nuttx.nuttx/fix_up_sigdeliver_for_smp (pull request #1043)
arch: armv7-m: Fix a deadlock in up_sigdeliver() in SMP mode.

In previous implementation, up_disable_irq() was called before
recovering local context. However, I noticed a deadlock happens
in the following situation. For example, if up_sigdevliver() is
in progress on CPU0 and CPU1 has called up_cpu_paused to CPU0,
hence g_cpu_irqlock has been locked by CPU1, in this case,
we would see a deadlock in later call of enter_critical_section()
to restore irqcount.

To avoid this situation, we need to call enter_critical_section()
to break the deadlock.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-04 12:40:26 +00:00
Gregory Nutt
cc485f2e2c arch/arm/src/stm32/stm32_usbdev.c: Fix some new warnings reported by gcc 8.3.1 in build tests. 2019-10-03 16:34:14 -06:00
Masayuki Ishikawa
4c53f0d232 Merged in masayuki2009/nuttx.nuttx/spresense_smp (pull request #1041)
Spresense smp

* arch: arm: Add ARCH_GLOBAL_IRQDISABLE to ARCH_CHIP_CXD56XX in Kconfig

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* arch: arm: cxd56xx: Make fpuconfg() public in cxd56_start.c

    NOTE: fpuconfig() is called in both cxd56_start.c and cxd56_cpustart.c

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* arch: arm: cxd56xx: Add support for SMP

    NOTE: To run cxd56xx in SMP mode, new boot loader which will be
    released later must be used.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* arch: arm: cxd56xx: Add irq routing for SMP in cxd56_irq.c

    NOTE: In cxd56xx, each external interrupt controller can be
    accessed from a local APP_DSP (Cortex-M4F) only. This commit
    supports IRQ routing for SMP by calling up_send_irqreq() in
    both up_enable_irq() and up_disable_irq().

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* boards: spresense: Add smp configuration

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-03 13:06:21 +00:00
Gregory Nutt
a9f2c5e76a arch/arm/src/stm32l4/stm32l4_firewall.c: Correct a test to determine if an address lies in FLASH or not. Improper mask caused test to always fail. 2019-10-02 13:00:55 -06:00
Nathan Hartman
46aaec7ba0 Fix minor typos in docs and comments. 2019-09-29 12:52:20 -06:00
Juha Niskanen
c3d24571fb Fix some typos. Mostly inital->initial. 2019-09-27 06:32:32 -06:00
Juha Niskanen
5a73b54dc7 arch/arm/src/stm32l4/stm32l4_dumpgpio.c: Fix using wrong GPIO enable register. 2019-09-27 06:30:45 -06:00
Eduard Niesner
dc43f4e648 arch\arm\src\stm32h7\Kconfig: Add the CRC option in KConfig. 2019-09-27 06:22:12 -06:00
Alin Jerpelea
7420f4dc5e Merged in alinjerpelea/nuttx (pull request #1038)
cxd56xx: various fixes

* arch: arm: cxd56xx: Support to set any i2c frequency

    This commit supports to be able to set the i2c frequency other than just
    100 or 400 Hz.

* arch: arm: cxd56xx: Enable SD clock during access to SD card

    - Improve GNSS low sensitivity with SD card inserted
    - Reduce power consumption by stopping SD clock

* arch: arm: cxd56xx: Do PANIC() when cpu rx fifo is overflow

    If CPU Rx FIFO is overflow, it's fatal error for system. In such a case,
    this commit changes to allow the user to notice by calling PANIC() for
    debuggability enhancement.

* arch: arm: cxd56xx: Fix compile error in sdhci debug code

* arch: arm: cxd56xx: Remove assertion in cpu tx queue

    When CPU Tx queue is overflow, it returns -EAGAIN instead of assertion
    to be able to retry.

* arch: arm: cxd56xx: Add configurations for cpu fifo elements

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arch: arm: cxd56xx: Fix LPADC configuration

    LPADC options defined in the same symbol name, so kconfig tool
    couldn't process them correctly.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arch: arm: cxd56xx: Update loader and gnssfw ver.17660

* arch: arm: cxd56xx: Fix hang-up when error interrupt occurs

    Fix a problem that error interrupts are not cleared.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arch: arm: cxd56xx: Fix sdhci semaphore

    Fix inital value of semaphore in sdhci drive.r

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: Treat the initial value of LNA power as off

    LNA is always turned power on when GNSS is started. So it is desirable
    that the initial value of the LNA power is off by default.

* boards: cxd56xx: Remove initial setting of PIN_AP_CLK

    PIN_AP_CLK is used as a port selector of SDIO expander on the extension
    board, and is set output low in initalizing. Therefore, this pin cannot
    be used for other board. To avoid this restriction, remove this initial
    operation because this pin is pulled down by default on the extension
    board.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-09-26 11:28:26 +00:00
David Sidrane
04b501eddf Merged in david_s5/nuttx/master_h7 (pull request #1037)
stm32h7:RCC Add PLL3 Support and only enable PLLs if used

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-09-24 14:30:05 +00:00
Markus Bernet
08ffb3d285 arch/arm/src/stm32h7/hardware/stm32_adc.h: Fix typos in ADC register definitions. 2019-09-24 06:53:12 -06:00
Gregory Nutt
43fc0fee03 arch/arm/src/imxrt/imxrt_enet.c: Fix some trivial coding standard problems. 2019-09-23 07:47:42 -06:00
Gregory Nutt
ed830550e9 arch/arm/src/imxrt/imxrt_lpspi.c: Fix some copy-paste errors for LPSPI3 and LPSPI4. 2019-09-23 07:46:56 -06:00
Andrei Stefanescu
eae495bc0a arch/arm/src/lpc54xx/lpc54_clockconfig.c: Fix PLL settings. For the lpc54628 Rev. E board the PLL was not configured properly and the board wouldn't boot correctly. I checked the startup files from the official IDE and inspected the assembly instructions for the libraries used. 2019-09-22 13:41:38 -06:00
Gregory Nutt
261cd9df4b arch/arm/src/imxrt/imxrt_idle.c: Dave Marples <dave@marples.net>. 2019-09-21 07:31:00 -06:00
Dave Marples
62fca7c376 arch/arm/src/imxrt/imxrt_usdhc.c: Move some comments. 2019-09-21 07:26:49 -06:00
Dave Marples
05bbbec3e1 Add support for the BCM43438A1 Bluetooth capability. It also adds a serial 'shim' to allow any regular serial port that can support a Bluetooth H4 interface (i.e. it has RTS/CTS) to be used to drive a Bluetooth device (Get a handle to it via hci_uart_getdevice("/dev/xxx") and then pass it to the btuart_register function.
Most of the bluetooth and wifi chips appear to need external firmware, and the 43438 is no exception. Fortunately, since Cypress got involved, these are much more straightforward to obtain and are shipped as part of their SDK, which is downloadable from their website.  Those firmwares are already provided as C arrays, so their names just need updating to;

const unsigned char bt_firmware_hcd -> The bt firmware array.

const int bt_firmware_len = sizeof(bt_firmware_hcd);
2019-09-21 07:16:37 -06:00
Juha Niskanen
5c853cd1dc libs/libc/unistd/lib_getcwd.c: remove stray sched_unlock(). Also fixes several typos. 2019-09-20 06:23:48 -06:00
Juha Niskanen
e8b5dd4528 Fix use of undefined pp-token #errror, other typos. 2019-09-19 18:19:18 -06:00
David Sidrane
c6689b3093 stm32h7 SDMMC support IDMA, Interrupt driven, pullups and SDIO
* stm32h7:Supports ARMV7M Stack check
* stm32h7:sdmmc bug fix writting address 0
* stm32h7:sdmmc Clean up timming
* stm32f7:Kconfig typos, formating
* stm32f7:sdmmc use binary not
* stm32f7:nxstyle formatting
* stm32h7:SDMMC Kconfig add Block Setup, Preflight, Delayed Invalidate
* stm32h7:Correct value of ICR reset
* stm32h7:SDMMC support IDMA, Interrupt driven, pullups and SDIO
* stm32h7:Add AXI
* stm32h7:Workaround for Errata 2.2.9 Reading from AXI SRAM may lead to data read corruption
2019-09-19 16:13:24 +00:00
Gregory Nutt
9eba6bf018 arch/arm/src/stm32f0l0g0 and boards/arm/stm32f0l0g0/nucleo-g071rb: The last change did NOT eliminate the build problem. This one does. 2019-09-18 15:13:13 -06:00
Gregory Nutt
f581315b06 arch/arm/src/stm32f0l0g0: Fix some link timer errors introduced with recent changes to RCC/PWR. 2019-09-18 14:22:44 -06:00
Augusto Fraga Giachero
08b596d26d rch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c: Respect the I2C_M_NOSTART flag. Sending a restart condition when not requested will break other drivers that depend on this behavior. 2019-09-17 16:14:58 -06:00
Gregory Nutt
a8a59df260 arch/arm/src/stm32f0l0g0/stm32*_pwr.c: Add some files missing in a previouis commit. 2019-09-17 11:34:05 -06:00
Daniel Pereira Volpato
031b83cff3 arch/arm/src/stm32f0l0g0/stm32*_pwr.c and stm32g0_rcc.c: Scale dynamic voltage and flash wait states properly on STM32G0 chips.
arch/arm/src/stm32f0l0g0/stm32g0_rcc.c: Set VOS and flash wait states properly
arch/arm/src/stm32f0l0g0/stm32f0l0_pwr.c: Renamed from arch/arm/src/stm32f0l0g0/stm32_pwr.c
arch/arm/src/stm32f0l0g0/stm32g0_pwr.c: Preliminary implementation of PWR module for STM32G0 (stm32_pwr_setvos() only)
2019-09-17 11:29:49 -06:00
Daniel Pereira Volpato
61055cee94 Add support for STM32G070xx
arch/arm/include/stm32f0l0g0: add support for STM32G070CB, STM32G070KB, STM32G070RB
arch/arm/src/stm32f0l0g0: add support for STM32G070CB, STM32G070KB, STM32G070RB
2019-09-17 11:10:38 -06:00
Juha Niskanen
ebc6f51641 Fix some typos 2019-09-17 10:46:23 -06:00
Takayoshi Koizumi
ef28729374 boards/arm/cxd56xx/spresense/include/board_pinconfig.h: Add board specific pin configurations of CXD5602 pins to fit Spresense board. 2019-09-16 15:32:58 -06:00
Gregory Nutt
20f4e05b09 arch/arm/src/stm32h7/stm32_ethernet.c: Bazooka Joe's fix to the STM32 F7 Ethernet driver (ec4a7be5c2) should be applied to the H7 as well. The other STM32 Ethernet driver already has the change. 2019-09-16 08:24:58 -06:00
Bazooka Joe
ec4a7be5c2 Merged in BazookaJoe1900/nuttx/pr-network_stm32_freebuffer (pull request #1030)
Large ethernet packet can leads network halt

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-09-16 13:52:56 +00:00
Gregory Nutt
e2949d0dcf boards/arm/stm32/axoloti, omnibusf4, and stm32f4discovery: If CONFIG_SCHED_CRITMONITOR is selected, then make sure that ITM and DWT resources are enabled before accessing ITM and DWT registers. By default, these registers are disabled. Suggested by Juha Niskanen. 2019-09-13 07:22:00 -06:00
Nathan Hartman
366053e464 Fix typos, 1 in a #define, others in comments. This changes one definition: _MQ_TIMEDRECIEVE is changed to _MQ_TIMEDRECEIVE. It appears this symbol is not used anywhere. 2019-09-11 08:56:56 -06:00
Adam Porter
1da921c00f STM32, STM32F7, STM32H7, STM32L4, and EFM32 USB Host: This change was required to get my devices (CDC-MBIM) to enumerate. Initially the system timed out retrieving the USB configuration descriptor. Ctrl IN requests got nothing but NAKs. I found that the initial SETUP packet and corresponding IN transfer were fine; it was the Status OUT phase that was getting the NAK. After receiving a NAK on the Status OUT, the code would loop back and issue another ctrl IN, which will always fail because the data was already transferred before. Thus the entire transfer would 'timeout'. The fix I implemented moves the DATANAK timeout loop to only apply to the Status OUT. Of course this worked for my devices, but maybe isn't the right solution in general. I think that both the ctrl IN and the Status OUT need their own retry loops? 2019-09-09 17:08:31 -06:00
Oki Minabe
f9327b6b06 arch/arm/src/armv7-a/arm_pgalloc.c: Fix L2 page table mask for armv7-a. 2019-09-08 07:06:00 -06:00
Oki Minabe
c570439c07 arch/arm/src/armv7-a/arm_addrenv_utils.c: Fix double increment in armv7-a's arm_addrenv_destroy_region(). 2019-09-08 07:04:37 -06:00
Oki Minabe
3e44e9107c arch/arm/src/armv7-a: Fix typo and missing quotation for armv7-a. 2019-09-08 07:01:57 -06:00
Gregory Nutt
4b1eecad66 EFM32 OTG host: Adam porters fix for STM32 FS/HS probably should be applied to EFM32 host which which has very similar IP. 2019-09-08 06:58:34 -06:00
Gregory Nutt
726ea3c8a9 stm32f7/h7/l4 OTG host: Adam porters fix for STM32 FS/HS probably should be applied to STM32 F7, H7, and L4 OTG host which are very similar. 2019-09-08 06:50:47 -06:00
Adam Porter
5b4516d291 arch/arm/src/stm32/stm32_otg[fs|hs]host.c: STM32 host only initiates transfer if buflenl > 0. 2019-09-08 06:46:54 -06:00
Juha Niskanen
822bb06967 Fix some typos. Also minor update to stm32f7/nucleo-144/README.txt and stm32l4/nucleo-l496zg/README.txt board documentation. 2019-09-05 08:12:50 -06:00
Loyen Wang
0ad5bc50fb arch/arm/src/arm/up_fullcontextrestore.S: When performing stability test, the application would cause kernel crash. When I trace the stack, I find that register R1 has been changed, and its value is the same as register CPSR. In p_fullcontextrestore.S, the restoration of R0 and R1 is not atomic: 'msr cpsr r1 will enable interrupts and the recovery of r0 and r1 may be interrupted and the value or R1 may be changed. Fix is to use a single ldmia to restore R0, R1, and return via R15. 2019-09-04 07:49:27 -06:00
Augusto Fraga Giachero
68bbc8438c drivers/timers/pwm.c: Move the pwm/pwm.c driver to timers/pwm.c, The drivers/pwm contained only one .c file (pwm.c), so to avoid the proliferation of sub-directories inside drivers/ is better to move the pwm.c driver to drivers/timers. The pwm.h header was moved to include/nuttx/timers to keep consistency, so all files referencing it need to be updated. 2019-09-02 07:57:10 -06:00
Gregory Nutt
19e1db3f97 arch/arm/src/stm32/hardware/stm32_adc_*: Additional coding standard issues: Binary operators should be separated with spaces. 2019-08-31 17:54:38 -06:00
Gregory Nutt
97a71db3b1 arch/arm/src/stm32/hardware/stm32_adc_*: Clean up some coding standard issues. 2019-08-31 17:45:32 -06:00
Gregory Nutt
5f57b85438 arch/arm/src/stm32/stm32_adc.c: Another fix. adc_calibrate was called even when it was conditioned out, causing a link time failure. 2019-08-31 17:12:15 -06:00
Gregory Nutt
70fcf486a0 arch/arm/src/stm32/stm32_adc.c: Corect an error found in build testing. Recent commit to add STM32F1 calibration was not properly conditioned. Caused compilation errors on all STM32 F2 family members. 2019-08-31 17:06:24 -06:00
Gregory Nutt
e5c3874a3b Tiva directories: Fix TM4C129XNCZAD part number in Kconfig and identifiers. Rationale: Fully specify that this is the 212-pin BGA package (ZAD ending) and for consistency with earlier changes to other Tiva TM4C12x part numbers in Kconfig names and identifiers. 2019-08-30 08:46:57 -06:00
Matous Pokorny
2236916be6 arch/arm/src/stm32/stm32_adc.c: Add ADC calibration procedure for IP_ADC_V1. Tested on STM32F100, and it magically increased result accuracy. STM32F103 has the same calibration procedure. I am not sure about others. 2019-08-29 19:01:22 -06:00