Commit Graph

14275 Commits

Author SHA1 Message Date
Gregory Nutt
a9d713bbcc This is the initial commit the port to the SAMD5x/E5x MCU family and also support for the Adafruit Metro M4 board. It port is untested and unfinished. It currently will not even link due to some missing clock related logic.
Squashed commit of the following:

    arch/arm/src/samd5e5: Clean-up EIC logic.
    arch/arm/src/samd5e5:  Fix some compilation issues; Still issues with the EIC logic from samd2x.
    arch/arm/src/samd5e5:  Fix some compilation issues; bring in some EIC logic from samd2x.
    arch/arm/src/samd5e5:  Add NVMCTRL header file, fix some compiler problems, misc. clean-up.
    configs/metro-m4:  Add LED support.
    arch/arm/src/samd5e5:  Bring in SAML21 clock configuration.  This is a WIP; it cannot possible even compile yet.
    arch/arm/src/samd5e5:  Leverage Cortex-M4 interrupt and SysTick logic from the SAM3/4.
    arch/arm/src/samd5e5: Add SERCOM utility function.
    arch/arm/src/samd5e5:  Bring all SERCOM USART logic from SAMD2L2 to SAMD5E5.  This is a brute coy with nothing more than more that name changes and extension from 5 to 7 SERCOMs.
    arch/arm/src/samd5e5: Add sam_config.h header file
    arch/arm/src/samd5e5/:  Add Generic Clock (GCLK) utility functions.
    arch/arm/src/samd5e5:  Add EVSYS register definition file
    arch/arm/src/samd5e5 and configs/metro-m4:  Use SERCOM3 for the Arduino serial shield as console.
    arch/arm/src/samd5e5/chip:  Add SERCOM USART, SPI, I2C master, and slave register defintions header files
    arch/arm/src/samd5e5/chip:  Add AES, PM, TRNG, and WDT header files.
    arch/arm/src/samd5e5/chip:  Add pin multiplexing header files.
    Various fixes to configuration system; fix metro-m4/nsh defconfig file.
    configs/metro-m4:  Add initial support for the Adafruit Metro M4 board.
    arch/arm/src/samd5e5:  Add peripheral clock helpers.
    arch/arm/src/samd5e5/chip:  Add PAC register definition header file.  Fix some errors in the memory map header file.
    arch/arm/src/samd5e5:  Add chip.h headerf file.
    arch/arm/src/samd5e5:  Add PORT register definitions and support from SAML21.
    arch/arm/include/samd5e5:  Add interrupt vector definitions.
    arch/arm/src/samd5e5:  Add some boilerplate files.  Correct some typos.
    arch/arm/src/samd5e5/chip/sam_eic.h:  Add EIC register definitions.
    arch/arm/src/samd5e5/chip:  Add OSC32KCTRL and OSCCTRL register definitions.
    arch/arm/src/samd5e5/chip:  Add GCLK, MCLK, and RSTC header files.
    arch/arm/src/samd5e5/chip/sam_cmcc.h:  Add CMCC register definitions
    arch/arm/src/samd5e5/chip/sam_supc.h:  Add SUPC header file.
    arch/arm/src/samd5e5:  Add start-up logic.
    arch/arm/src/samd5e5:  Add Make.defs file
    arch/arm/src/samd5e5/chip:  Add memory map header file.
    arch/arm/include/samd5e5:  Add chip.h header file.
    arch/arm/Kconfig and arch/arm/src/samd5e5/Kconfig:  Add configuration logic for the SAMD5x/Ex family.
2018-07-26 12:12:08 -06:00
Jake Choy
bf2a61b8cf I finally got the CRC32 to work properly after the FAE pointed me in the right direction. Here is a patch for the enet driver:
- Added CRC32 functions for multicast address filtering.
- Do not reset PHY settings when doing an ifup
- Use chip's unique id as the device MAC
- Enable discard enet frames with errors at PHY layer
2018-07-26 08:31:40 -06:00
Gregory Nutt
f2d3dc152e arm/src/stm32f0/chip/stm32f0_rcc.h: Fix some typos. 2018-07-26 08:31:40 -06:00
Ivan Ucherdzhiev
579e984d8a arch/arm/src/imxrt/imxrt_serial.c: IMXRT1050 LPUART TERMIOS support added. 2018-07-26 07:08:17 -06:00
Ivan Ucherdzhiev
35fbaf7c4c arch/arm/src/imxrt/chip/imxrt_lpspi.h: IMXRT1050 LPSPI register and bit definitions added. 2018-07-26 07:03:57 -06:00
Gregory Nutt
5a0733d0d6 arch/arm/src/samd2l2: Fix a couple of logic error/typos found in reviewing code for port to SAMD51. 2018-07-25 13:41:09 -06:00
Gregory Nutt
6dc25e1150 arch/arm/src/samd2l2/chip/saml_evsys.h: Complete some unfinished settings. 2018-07-25 11:44:41 -06:00
Gregory Nutt
830faf355b arch/arm/src/samd2l2/Kconfig: Cosmetic re-ordering of some options. 2018-07-25 09:55:04 -06:00
Gregory Nutt
444445744a arch/arm/src/samd2l2/chip: Correct some typos noted in SAML21 header files 2018-07-25 08:46:18 -06:00
Gregory Nutt
e428f3852a arm/Kconfig: Add spurious 'invisible' configuration settings to avoid prompting users for hardfault or memfault debug on systems where such debug is not available. 2018-07-24 05:54:30 -06:00
Masayuki Ishikawa
3b15cae493 Merged in masayuki2009/nuttx.nuttx/debug_memfault (pull request #693)
arch/arm: Add CONFIG_DEBUG_MEMFAULT to Kconfig

Also, fix src/armv7-m/up_memfault.c

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-24 11:42:54 +00:00
Gregory Nutt
1c31036e94 Remove spurious blank line from last PR. 2018-07-23 13:43:07 -06:00
David Sidrane
82fc9986bf Merged in david_s5/nuttx/master_kinetis_sdhc_dma (pull request #692)
kinetis:sdhc fix SDIO driver so that DMA works

There were 2 problems. The first was that the interrupt did
   test DINT and raise a completion events. But since DINT is
   just an indication of DMA completion, TC is a valid way to
   determine that the transfer is complete.

   The second problem is that Software Reset For DAT Line
   SDHC_SYSCTL[RSTD] clears the bits 24-0 in SDHC_PROTO
   this looses the wide bus setting DTW

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-23 19:41:23 +00:00
Frank Benkert
524602fb51 arch/arm/src/samv7/sam_mcan.c: Correct an error in the BUS_OFF reporting. In case of BUS_OFF the old implementation was leading to a package storm. Now it reports the error condition BUS_OFF only once. 2018-07-23 08:21:06 -06:00
Gregory Nutt
62ea8f5805 arm/Kconfig and arm/src/samd2l2/Kconfig: Rename ARCH_CHIP_SAMD to ARCH_CHIP_SAMD2X and ARCH_CHIP_SAML to ARCH_CHIP_SAML2X. 2018-07-22 16:41:13 -06:00
Gregory Nutt
c3b406826e Rename all usage of samdl/SAMDL to samd2l2/SAMD2L2 to make room in the name space for the forthcoming samd5e5/SAMD5E5
Squashed commit of the following:

    Change all remaining occurrences of SAMDL to SAMD2L2.

    configs/:  Change all remaining occurrences of SAMDL to SAMD2L2

    configs/:  Change all occurrences of CONFIG_SAMDL_* to CONFIG_SAMD2L2_*
    arch/arm/src and include:  Rename all directories from samdl to samd2l2.  Change all configuration variable names and other usage from SAMDL to SAMD2L2.
2018-07-22 15:54:12 -06:00
Bob Feretich
f9f56aa254 arch/arm/src/stm32f7/: Fix data timeout errors with multiblock transfers. 2018-07-20 09:52:32 -06:00
Masayuki Ishikawa
9ea6d9aec5 Merged in masayuki2009/nuttx.nuttx/lc823450_protected_build (pull request #689)
lc823450 protected build

* arch/arm/src/lc823450: Add support for mpu and userspace

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

* configs/lc823450-xgevk: Add support for userspace

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

* configs/lc823450-xgevk: Add kostest

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

* configs/lc823450-xgevk: Add knsh

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-20 10:43:07 +00:00
David Sidrane
e9cd6089c9 Merged in david_s5/nuttx/master_kinetis_usbhang (pull request #688)
kinetis:USB0 fix interrupt storm on error

The ERROR bit of USBx_ISTAT needed to be cleared once an
   error occured.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-19 20:13:47 +00:00
Masayuki Ishikawa
4bc2ba3bee Merged in masayuki2009/nuttx.nuttx/lc823450_spi_flash (pull request #687)
lc823450 spi flash

* arch/arm/src/lc823450: Add SPI flash driver for lc823450

    NOTE: Only bus accelerator mode is supported.

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

* arch/arm/src/lc823450: Remove unnecessary settings in Kconfig

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-18 11:45:20 +00:00
Daniel P. Carvalho
9223123cd2 arch/arm/src/stm32l4: Added custom pin mapping for STM32L4X2XX processors. 2018-07-16 15:42:13 -06:00
Gregory Nutt
4d648625e3 arch/arm/src/stm32fy: IO compensation is non longer an inline function, just a plain callable function. Not really necessary for the F7, but now the implementation is identical to the F2 and F4. 2018-07-16 09:50:10 -06:00
Gregory Nutt
871bface28 arch/arm/src/stm32: Use of inline function for I/O compensation causes too many issues. No just a plain callable function. 2018-07-16 09:05:53 -06:00
Gregory Nutt
c1a2c55764 arch/arm/src/stm32/stm32_gpio.h: Correct a recently introduced compilation error: Not all STM32s have chip/stm32_syscfg.h 2018-07-16 08:43:28 -06:00
Gregory Nutt
f09f186375 arch/arm/src/stm32f7: Port Bob Feritich's change (2c699d7812) to STM32 F2 and F4 which appear to have identical SD support and I/O compensation requirements. 2018-07-15 17:46:58 -06:00
Gregory Nutt
0c093f800d arch/arm/src/stm32f7: Port Bob Feritich's change (2c699d7812) to SDMMC2 and to all other STM32F7 architectures. Also add a conifiguration option to automatically enable I/O compensation. 2018-07-15 16:17:41 -06:00
Gregory Nutt
2c699d7812 arch/arm/src/stm32f7/chip/stm32f72xx73xx_pinmap.h: All of the SDMMC pins were set to 50 MHz, but not the clock. This sets the clock to 50 MHz also. This combined with turning on I/O compensation makes intermittent failures go away. 2018-07-15 15:23:39 -06:00
Gregory Nutt
a74246d14e Squashed commit of the following:
Update some comments
    drivers/usbhost/usbhost_max3421e.c:  Fix issue with uninitialized data.
2018-07-14 13:40:13 -06:00
Gregory Nutt
38073a523a drivers/usbhost/husbhost_max3421e.c: Corret how VBUS power is controlled. 2018-07-14 08:50:08 -06:00
Gregory Nutt
859d032938 This commit adds support for the MAX3421E to the viewtool-stm32107 board support
Squashed commit of the following:

    configs/viewtool-stm32f107:  Clean up some compilation errors.  Now all builds correctly and is ready for test.

    arch/arm/src/stm32:  Do not condition building STM32 USB host logic on CONFIG_USBHOST.  That then precludes building STM32 platforms with external USB host chips like the MAX3421E.  Add an new, STM32-internal variable CONFIG_STM32_USBHOST that does the same job without such side-effects.

    configs/viewtool-stm32f107:  Add support for MAX3421E USB host.
2018-07-13 10:45:08 -06:00
David Sidrane
6e6583f5a3 Merged in david_s5/nuttx/master_singlewire (pull request #680)
Added Single Wire Kconfig knob for H7

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-12 19:47:12 +00:00
David Sidrane
fbe5f56dd5 Merged in david_s5/nuttx/master_singlewire (pull request #679)
Added Single Wire Kconfig knob

* stm32f0:Added Kconfig knob for STM32F0_USART_SINGLEWIRE

* stm32f7:Added Kconfig knob for STM32F7_USART_SINGLEWIRE

* stm32l4:Corrected comment in Kconfig STM32L4_USART_SINGLEWIRE

* stm32:Added Kconfig knob for STM32_USART_SINGLEWIRE

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-12 19:30:43 +00:00
Gregory Nutt
c09efb2603 arch/arm/src/stm32h7: Correct naming of global variables that violations the naming requirements of the coding standard. 2018-07-12 13:19:57 -06:00
Gregory Nutt
e569872358 arch/arm/Kconfig: Since the basic STM32H7 port is working, let's remove the EXPERIMENTAL dependency. 2018-07-12 12:35:35 -06:00
Mateusz Szafoni
82e5c6ceea Merged in raiden00/nuttx_h7 (pull request #677)
stm32h7: fix some definitions for uart, add serial driver with FIFO enabled

* stm32h7: stm32_irq.c: extend irqinfo to support H7 family

* stm32h7: fix some definitions for uart, add serial driver with FIFO enabled

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-12 18:31:59 +00:00
Gregory Nutt
f3c12215cf arch/arm/src/stm32, stm32f0, stm32f7, stm32: Correct naming of global variables that violations the naming requirements of the coding standard. 2018-07-12 10:54:51 -06:00
Masayuki Ishikawa
562637391c Merged in masayuki2009/nuttx.nuttx/lc832450_elf_test (pull request #675)
lc832450 elf test

* arch/arm/src/lc823450: Change CONFIG_DEBUG to CONFIG_DEBUG_FEATURES in lc823450_start.c

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

* configs/lc823450-xgevk: Call elf_initialize() in lc823450_bringup.c

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

* configs/lc823450-xgevk: Add ELF related parameters in Make.defs

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

* configs/lc823450-xgevk: Add elf configuration

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-12 12:05:55 +00:00
Mateusz Szafoni
639d75ca3a Merged in raiden00/nuttx_h7 (pull request #674)
stm32h7: stm32_irq.c: extend irqinfo to support H7 family

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-11 19:13:55 +00:00
Daniel Pereira Carvalho
8432164e52 arch/arm/src/stm32l4/chip/: Corrects some mistakes in pin definitions for the STM32L4 family. According to datasheet of STM32L496xx, STM32L475xx and STM32L443XX the AF2 of PE14 is TIM1_BKIN2 not TIM2_BKIN. 2018-07-10 08:01:00 -06:00
Mateusz Szafoni
8271f72b72 Merged in raiden00/nuttx_h7 (pull request #672)
stm32h7: add lowputc, more cosmetic in stm32h7x3xx_rcc.h

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-09 16:32:22 +00:00
Alan Carvalho de Assis
283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Gregory Nutt
1783d344dc Eliminate some new warnings found in build testing. 2018-07-08 13:44:39 -06:00
Mateusz Szafoni
fa56b1bbc7 Merged in raiden00/nuttx_h7 (pull request #671)
stm32h7

stm32h7: compile with stm32_rcc.c

stm32h7: some PWR definitions

stm32h7: add some RCC defs and change some code style to be more like in other STM ports

stm32h7: basic clocks configuration

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-08 18:28:14 +00:00
Mateusz Szafoni
9e63080b4b Merged in raiden00/nuttx/stm32h7 (pull request #670)
stm32h7x3xx: add flash definitions

* libdsp: initial commit

* libdsp: cosmetics

* stm32f334-disco/buckboost: use a PID controller from libdsp

* stm32_adc.h: fix typo

* stm32_dac.c: set OUTEN bit for DAC1CH2 and DAC2CH1

* stm32_hrtim: cosmetic changes

* power/motor: direction parameter is now int8 + add overload fault

* libdsp: all floats with f-sufix

    libdsp: add precision option for library

    libdsp: add debug option for library and assertions in functions

    libdsp: add current samples correction for SVM3

    libds: add some motor control specific functions

    libdsp: add basic speed observer

    libdsp: fix phase shift in SMO observer

    libdsp: add more logic to FOC

    config/sim/dsptest: add dsptest configuration

* libdsp/lib_motor.c: remove unused comparation

* libdsp/lib_observer.c: update some comments

* stm32h7x3xx: add flash definitions

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-08 13:15:44 +00:00
kxjiang
70dc642da3 The LPC54608 can only run at a maximum frequency of 180Mhz. This configuration requires uses the clk_in, external crystal clock, to drive the PLL. When that input was selected, the board bootup failed waiting for the PLL to lock. After referring the driver from NXP, we should turn on power sources for the ext clock if system pll input select clk_in. NOTE that the LPC54628 did not require this step... perhaps because the system oscillator power was already enabled. 2018-07-08 06:58:14 -06:00
Gregory Nutt
1450c0c2f2 arch/arm/src/stm32f7/stm32_sdmmc.c: Fix some missing right parentheses. 2018-07-07 15:23:46 -06:00
Mateusz Szafoni
8416d9a966 Merged in raiden00/nuttx (pull request #668)
Master

* libdsp: initial commit

* libdsp: cosmetics

* stm32f334-disco/buckboost: use a PID controller from libdsp

* stm32_adc.h: fix typo

* stm32_dac.c: set OUTEN bit for DAC1CH2 and DAC2CH1

* stm32_hrtim: cosmetic changes

* power/motor: direction parameter is now int8 + add overload fault

* libdsp: all floats with f-sufix

    libdsp: add precision option for library

    libdsp: add debug option for library and assertions in functions

    libdsp: add current samples correction for SVM3

    libds: add some motor control specific functions

    libdsp: add basic speed observer

    libdsp: fix phase shift in SMO observer

    libdsp: add more logic to FOC

    config/sim/dsptest: add dsptest configuration

* libdsp/lib_motor.c: remove unused comparation

* libdsp/lib_observer.c: update some comments

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-07 17:04:57 +00:00
Gregory Nutt
6cb9f8001c Squashed commit of the following:
lpc17, sam34:  Rename some improperly scoped configuration variables; fix some duplicate configuration variable names.
    lpc11, lpc17, lc823450:  Rename some improperly scoped configuration variables; fix some duplicate configuration variable names.
    lpc11, lpc17, lpc43:  Rename some improperly scoped configuration variables; fix one duplicate configuration variable.
2018-07-06 09:15:57 -06:00
Ramtin Amin
f39c611d64 arch/arm/src/stm32f7/stm32_sdmmc.c: Add SDIO coard support. 2018-07-05 07:31:41 -06:00
Gregory Nutt
22cd0d47fa This commit attempts remove some long standard confusion in naming and some actual problems that result from the naming confusion. The basic problem is the standard MTU does not include the size of the Ethernet header. For clarity, I changed the naming of most things called MTU to PKTSIZE. For example, CONFIG_NET_ETH_MTU is now CONFIG_NET_ETH_PKTSIZE.
This makes the user interface a little hostile.  People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header).  A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length.  Instead, we define the packet buffer size then derive the MTU.

The MTU is not common currency in networking.  On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP).  Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes.  So we should be all good and without the recurring 14 byte error in MTU's and MSS's.

Squashed commit of the following:

    Trivial update to fix some spacing issues.
    net/: Rename several macros containing _MTU to _PKTSIZE.
    net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE.  This is not the MTU which does not include the size of the link layer header.  This is the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename the file d_mtu in the network driver structure to d_pktsize.  That value saved there is not the MTU.  The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header.  The MTU does not include the link layer header.
2018-07-04 14:10:40 -06:00
Frank Benkert
317c7c2aff arch/arm/src/samv7: Add ability for CAN BUS_OFF autorecovery according ISO11898-1:2015. With this change we added an ioctl for triggering the autorecovery sequence for BUS_OFF to the CAN-driver and the SAMV7 low-level driver. According the datasheet: If the device goes Bus_Off, it will set MCAN_CCCR.INIT of its own accord, stopping all bus activities. Once MCAN_CCCR.INIT has been cleared by the processor (application), the device will then wait for 129 occurrences of Bus Idle (129 * 11 consecutive recessive bits) before resuming normal operation. At the end of the Bus_Off recovery sequence, the Error Management Counters will be reset. During the waiting time after the resetting of MCAN_CCCR.INIT, each time a sequence of 11 recessive bits has been monitored, a Bit0 Error code is written to MCAN_PSR.LEC, enabling the processor to readily check up whether the CAN bus is stuck at dominant or continuously disturbed and to monitor the Bus_Off recovery sequence. MCAN_ECR.REC is used to count these sequences. 2018-07-04 07:48:59 -06:00
Masayuki Ishikawa
88f8a09a25 Merged in masayuki2009/nuttx.nuttx/lc823450_i2s_tx_threshold (pull request #667)
arch/arm/src/lc823450: Add tx start threshold to lc823450_i2s.c

In addition, lc823450_i2s_send() now accepts byte-aligned stream.

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-03 12:59:03 +00:00
Marcin Wyrwas
898fdbded0 Merged in plwm/nuttx/stm32f746g-disco-sdram (pull request #665)
Add support for STM32F746G-disco board SDRAM

* add support for STM32F746G-disco board SDRAM

* changed fb config to use SDRAM and fixed compilation

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-02 23:49:55 +00:00
Alan Carvalho de Assis
8a1f3d6fa1 arch/arm/src/xmc4/xmc4_gpio.c: Add a specific bit encoding for openprain GPIO pin. 2018-07-02 10:56:58 -06:00
Gregory Nutt
824f1dd3fe Squashed commit of the following:
lpc17:  Removed duplicate configuration variable definitions from Kconfig:  CONFIG_USBHOST_BULK_DISABLE, CONFIG_USBHOST_INT_DISABLE, and USBHOST_ISOC_DISABLE.  These are global USBHOST configurations and are all defined in drivers/usbhost/Kconfig.
    lpc17:  Correct scope of naming of configuration variables:  CONFIG_USBHOST_TDBUFFERS->CONFIG_LPC17_USBHOST_TDBUFFERS, CONFIG_USBHOST_TDBUFSIZE->CONFIG_LPC17_USBHOST_TDBUFSIZE, and CONFIG_USBHOST_IOBUFSIZE->CONFIG_LPC17_USBHOST_IOBUFSIZE
    lpc17:  Correct scope of naming of configuration variables:  CONFIG_USBHOST_NEDS->CONFIG_LPC17_USBHOST_NEDS and CONFIG_USBHOST_NTDS->CONFIG_LPC17_USBHOST_NTDS
    lpc17:  Correct scope of naming of configuration variable:  CONFIG_USBHOST_OHCIRAM_SIZE->CONFIG_LPC17_OHCIRAM_SIZE
2018-07-01 08:38:05 -06:00
Gregory Nutt
d52b65b06d Fix several configuration varaibles that were defined in multiple Kconfig files and/or lacked any scoping and the naming.
Squashed commit of the following:

    lpc17, pic32mx, pic32mz:  Fix duplicated, improperly scoped configuration variable names:  CONFIG_PHY_SPEED100 and CONFIG_PHY_AUTONEG.
    lpc17, pic32mx, pic32mz:  Fix another duplicated configuration variable name:  CONFIG_PHY_FDUPLEX.
    lpc17:  Fix naming scope: CONFIG_NET_HASH -> CONFIG_LPC17_ETH_HASH.
    lpc17:  Fix naming scope: CONFIG_NET_WOL -> CONFIG_LPC17_ETH_WOL.
    lpc17, pic32mx, pic32mz:  Fix naming scope: CONFIG_NET_ -> CONFIG_LPC17_ETH_PRIORITY.
    lpc17, pic32mx, pic32mz:  Fix another duplicated configuration variable name:  CONFIG_NET_NTXDESC and CONFIG_NET_NRXDESC.
    lpc17:  Fix naming scope: CONFIG_NET_EMACRAM_SIZE -> CONFIG_LPC17_EMACRAM_SIZE.
2018-06-30 11:55:41 -06:00
Gregory Nutt
576b8b1841 stm32, stm32f0, stm32f7, stm32h7, stm32l4: Fix another duplicated configuration variable name: CONFIG_SERIAL_DISABLE_REORDERING. 2018-06-30 09:43:51 -06:00
Gregory Nutt
f159f1089a tools/refresh.sh: Add a --prompt option that will let you use --silent but will prompt before overwriting the original defconfig. arch/arm/src/stm32/Kconfig: Fix a HRTIM configuration error found in build testing. 2018-06-28 17:12:30 -06:00
Gregory Nutt
67810d70d9 arch/arm/src/stm32l4: Fix typo errors found in build testing. 2018-06-28 16:24:21 -06:00
Gregory Nutt
f24f523e4e arch/arm/src/imxrt,stm32,stm32f0,stm32f7,stm32l4: Fix scope of naming. CONFIG_PM_SERIAL_ACTIVITY->CONFIG_STM32_PM_SERIAL_ACTIVITY, for example. 2018-06-28 16:18:15 -06:00
Gregory Nutt
ceaafc2019 arch/arm/src/stm32: Fix scope of naming. CONFIG_RTC_LSECLOCK->CONFIG_STM32_RTC_LSECLOCK, for example. Fix some usage. Although CONFIG_STM32L4_RTC_xxxCLOCK was defined in the Kconfig, CONFIG_RTX_xxxCLOCK was used in numerous places in the code 2018-06-28 15:58:08 -06:00
Gregory Nutt
500d2c2289 arch/arm/src/lpc11,lpc17,lpc43,stm32,stm32l4: Fix scope of naming. CONFIG_CAN_TSEG1->CONFIG_LPC17_CAN_TSEG, for example. 2018-06-28 15:44:42 -06:00
Gregory Nutt
2552bfd2ef arch/arm/src/lpc43: Fix lpc43 CAN configuration. Configuration settings were used and documented in README.txt files, but never in any Kconfig file. Also fix the scoping name of CAN variable naming. CONFIG_CANx_BAUD->CONFIG_LPC43_CANx_BAUD. 2018-06-28 15:11:23 -06:00
Gregory Nutt
45cdc3a3d0 arch/arm/src/lpc11,lpc17,stm32,stm32l4: Fix scopy of nameing. CONFIG_CANx_BAUD->CONFIG_LPC17_CANx_BAUD, for example. 2018-06-28 14:47:14 -06:00
Gregory Nutt
8c3aa99742 arch/arm/src/lpc11 and lpc17: Fix scopy of nameing. CONFIG_CAN_SAM->CONFIG_LPC17_CAN_SAM, for example. 2018-06-28 13:46:35 -06:00
Gregory Nutt
8281dc1ed8 arch/arm/src/lpc11 and lpc17 and several README.tst files in configs/: Fix scopy of nameing. CONFIG_CANx_DIVISOR->CONFIG_LPC17_CANx_DIVISOR, for example. 2018-06-28 13:10:02 -06:00
Gregory Nutt
2c78adf529 arch/arm/src/lpc11 and lpc17: Remove duplicate configuration variable CAN_LOOPBACK. The architecture-indendent version is selectable in drivers/can/Kconfig. 2018-06-28 12:52:02 -06:00
Gregory Nutt
104860560d arch/arm/src/lpc11 and lpc17: Remove duplicate configuration variable CAN_EXTID. The architecture-indendent version is selectable in drivers/can/Kconfig. 2018-06-28 12:50:10 -06:00
Gregory Nutt
7dec38b18f drivers/Kconfig: Global configuration variable CONFIG_FB_TRANSPARENCY is only defined in architecture-specific Kconfig files and then multiple times. Add the single global definition in drivers/Kconfig. arch/arm/src/stm32, stm32f7, and same5: Rename the architecture-specific variables appropriately. Selecting the architecture-specific version will also select the global version. 2018-06-28 12:31:51 -06:00
Gregory Nutt
ba53219821 drivers/Kconfig: Global configuration variable CONFIG_FB_CMAP is only defined in architecture-specific Kconfig files and then multiple times. Add the single global definition in drivers/Kconfig. arch/arm/src/stm32 and stm32f7: Rename the architecture-specific variables appropriately. Selecting the architecture-specific version will also select the global version. 2018-06-28 12:01:55 -06:00
Gregory Nutt
5d6e6d66e2 Fix another improperly qualified configuration varaible: CONFIG_HRTIM -> CONFIG_STM32_HRTIM. This is necessary to avoid conflict and confusion with other Kconfig files that may have the save variable definition. 2018-06-28 11:37:29 -06:00
Gregory Nutt
b030209532 arch/arm/src/imxrt: Trivial SNVS from Rev 1. of the Reference Manual. 2018-06-28 10:54:56 -06:00
Juha Niskanen
044d538da3 Fix some errors found during upstream merge 2018-06-28 07:06:57 -06:00
Gregory Nutt
9038cac4eb arch/arm/src/imxrt: Fix some early testing bugs. The HPRTC is now functional. However, if the LPSRTC is enabled, then there is a hang during LPSRTC initialization. It appears that there is some problem in providing clocking and initializing the LPSRTC domain. 2018-06-27 15:27:56 -06:00
David Sidrane
06c7b9a5bc Merged in david_s5/nuttx/master_f7_i2cfix (pull request #664)
stm32f7:I2C reset Configure I2C pins as GPIO output

Pins were reset to inputs in the deinit. This resets
   them to outputs.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-27 18:35:34 +00:00
Gregory Nutt
5889a2397c This commit addes support for the i.MXRT RTC. This initial commit is code complete (with limited featurs and options) but untested.
Squashed commit of the following:

    arch/arm/src/imxrt:  Fix some first time compile issues.
    arch/arm/src/imxrt:  This brings the RTC implement to code complete but still untested.
    arch/arm/src/imxrt:  Add some RTC initialization logic.
    arch/arm/src/imxrt:  Flesh out most of the RTC driver lower half and LPSRTC support.
    arch/arm/src/imxrt:  Some inital, partial implementation of the HPRTC and LPSRTC.
    arch/arm/src/imxrt:  Add HPSRTC/HPRTC file framework (no logic, just skeleton files).
    arch/arm/src/imxrt:  Add HPRTC header file.
    Some initial configuration logic for SNVS LPRTC and HP RTC.
2018-06-27 11:19:12 -06:00
Gregory Nutt
691470c1cd arch/arm/src/stm32,stm32l4,stm32f7: Fix duplicated configuration options. All should be unique. 2018-06-27 10:20:14 -06:00
Masayuki Ishikawa
529ac8dd9b arch/arm/src/lc823450: Fix setintstack macro in chip.h. In case of CONFIG_SMP=y, g_cpu0_instack_base and g_cpu1_instack_base
are not allocated just after g_instack_alloc but these values show the addresses for interrupt stack of each CPU. So to set the stack
pointer based on these variables, temporal register has to be used.
2018-06-27 06:50:00 -06:00
Gregory Nutt
d6ed50a370 arch/arm/src/stm32f7/chip/stm32f72xx73xx_dma.h: Macros did not account for the increase from 8 to 16 DMA channels. 2018-06-26 10:12:35 -06:00
Marcin Wyrwas
1c76e10c06 Merged in plwm/nuttx/stm32f746g-disco-lcd (pull request #661)
add support for STM32F746G-disco board LCD

Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-25 23:44:31 +00:00
Gregory Nutt
bdb73a60ca Fix some errors found in build testing. 2018-06-25 17:06:29 -06:00
Gregory Nutt
872a11b4a0 Correct some errors found in build testing. 2018-06-25 14:16:19 -06:00
Gregory Nutt
c65e1aa3df Squashed commit of the following:
syscalls/:  Add syscall support for if_nametoindex() and if_indextoname()
    net/: Update some comments.
2018-06-25 12:41:28 -06:00
Daniel Agar
68418262a5 Merged in dagar/nuttx/pr-fixCompileError (pull request #660)
stm32f7: Fix compile error caused by intentional use of fall through

Approved-by: Sebastien Lorquet <sebastien@lorquet.fr>
Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-25 16:33:56 +00:00
Gregory Nutt
579d1b898b Trivial update to some comments. 2018-06-22 07:53:34 -06:00
Gregory Nutt
82ff00fabf arch/arm/src/imxrt/chip: Add SNVS/RTC register definition header file. 2018-06-21 12:36:12 -06:00
Gregory Nutt
bb88f8d0bb Squashed commit of the following:
A few bugfixes in initial testing on the i.MX6.  Behavior seems a little more stable, but there are still memory corruption issues.  Also print CPU number on assertion.
    Add a file missed in the last big commit.
    arch/arm/src/armv7a and imx6:  Add support for per-CPU IRQ and FIQ interrupt stacks (bugfix).  Add support so that up_assert will print the correct interrupt stack on an assertion (FIQ stack is still not printed).
    arch/arm/src/lc823450: Combine the content of smp_macros.h into chip.h.  Add support so that up_assert will print the correct interrupt stack on an assertion.
2018-06-21 10:59:58 -06:00
Ivan Ucherdzhiev
bee8ed3289 arch/arm/src/imxrt/chip: Add I2C register definition header for the i.MX RT 2018-06-21 10:03:02 -06:00
Gregory Nutt
a0c0d7f42b Oops. Forgot to add files that go with the previous commit. 2018-06-21 07:15:35 -06:00
Juha Niskanen
c1518ecd26 arch/arm/src/stm32f7: Port input capture from stm32 2018-06-21 05:58:31 -06:00
Gregory Nutt
b3f61e8a4a arch/arm/src/armv7-m and arch/arm/src/lc823450: Fix support for multiple interrupt stacks needed in SMP mode. This was broken in the last set of commits that force all architectures to use the common interrupt vector logic. 2018-06-20 18:45:17 -06:00
Gregory Nutt
cb374e6e62 arch/: Clean up some naming and spacing. 2018-06-20 15:38:06 -06:00
Gregory Nutt
49ec86ddb1 arch/arm: Fix an error found in build testing. 2018-06-20 13:12:54 -06:00
Gregory Nutt
8bd9cfe038 Squashed commit of the following:
arch/arm:  Remove support for CONFIG_ARMV7M_CMNVECTOR.  It is now the only vector support available.  Also remove CONFIG_HAVE_CMNVECTOR.  That no longer signifies anything."
    arch/arm/src/stm32:  This commit removes support for the dedicated vector handling from the STM32 architecture support. Only common vectors are now supported.
2018-06-20 12:30:37 -06:00
Gregory Nutt
2ec450f185 arch/arm/Kconfig: Fix an ommission in the Kconfig from last Tiva commits. 2018-06-20 10:09:23 -06:00
Gregory Nutt
9a51854223 arch/arm/src/lc823450: This commit removes support for the dedicated vector handling from the LC823450 architecture support. Only common vectors are now supported. 2018-06-20 10:04:38 -06:00
Gregory Nutt
ade6751345 arch/arm/src/tiva: This commit removes support for the dedicated vector handling from the Tiva/LM architecture support. Only common vectors are now supported. 2018-06-20 09:18:42 -06:00
Gregory Nutt
b38618d0c6 Squashed commit of the following:
arch/arm/src/lpc17xx:  This commit removes support for the dedicated vector handling from the LPC17xx architectures. Only common vectors are now supported.
    arch/arm/src/kinetis:  This commit removes support for the dedicated vector handling from the Kinetis architectures. Only common vectors are now supported.
2018-06-20 08:18:32 -06:00
Gregory Nutt
dd899c0453 arch/arm/src/sam34: This commit removes support for the dedicated vector handling from the SAM3/4 architecture support. Only common vectors are now supported. 2018-06-19 18:13:15 -06:00
Gregory Nutt
01b740c66b arch/arm/src/efm32: Support for common vector handling is forced for all EFM32 chips. Yes the architecture provides support for the old-style dedicated vector handling which can never be compiled. Furthermore, the old-style dedicated vector handling is deprecated in favor of common vector handling. The commit resolves this inconsistency be removing support for the dedicated vector handling from the EFM32 architecture support. 2018-06-19 13:37:00 -06:00
Juha Niskanen
d42b6cbb97 arch/arm/src/stm32l4: STM32L4 has fetchadd and testset 2018-06-18 07:14:52 -06:00
Gregory Nutt
691676ac6b Eliminate some new warnings found in build testing. 2018-06-17 15:26:18 -06:00
Gregory Nutt
75220e27fc arch/arm/src/stm32h7: Correct permissions on several files. 2018-06-16 17:10:22 -06:00
Simon Laube
7b0475450c This commit brings in a partial, WIP port to the STMicro STM32H7. The port is still missing several key components that make unusable in its current form. However, the changes have lingered on a branch long enough.
See configs/nucleo-h743zi/README.txt for a detailed description of the state of the port.
2018-06-16 16:59:34 -06:00
Gregory Nutt
9e872fd993 Various locations: Fix typos due to missing right parenthese. Thanks to hyungsubkim for posting Issue #102 2018-06-16 16:19:32 -06:00
Gregory Nutt
32afb767f0 arch/arm/src/bcm2708/bcm_gpioint.c: Fixed missing left parenthesis. Note by Anonymous in Issue #101 2018-06-16 15:30:34 -06:00
Alan Carvalho de Assis
61a026dedd /arch/arm/src/xmc4: Fix XMC4 SPI. It was working only for the first transfer 2018-06-16 13:45:01 -06:00
Gregory Nutt
8fdbb1e0a4 Elimate use of the non-standard type systime_t and replace it the equivalent, standard type clock_t
Squashed commit of the following:

    sched:  Rename all use of system_t to clock_t.
    syscall:  Rename all use of system_t to clock_t.
    net:  Rename all use of system_t to clock_t.
    libs:  Rename all use of system_t to clock_t.
    fs:  Rename all use of system_t to clock_t.
    drivers:  Rename all use of system_t to clock_t.
    arch:  Rename all use of system_t to clock_t.
    include:  Remove definition of systime_t; rename all use of system_t to clock_t.
2018-06-16 12:16:13 -06:00
Gregory Nutt
a4496f036c arch/arm/src/stm32 and stm32f7: Make LTDC and DMA2D drivers as similar as possible. Basically they should only differ in the configuratin naming: CONFIG_STM32F7_ vs CONFIG_STM32_. I suspect that the STM32F7 may also require some cache operations with the WRITE_BACK data cache is enabled. 2018-06-15 15:10:19 -06:00
Gregory Nutt
6dcce0430c This change ports in Marco Krahl's STM32F4 framebuffer overlays for the LTDC and DMA2D into the STM32F7. That driver was same as the STM32F4 driver. I am unable to verify the update because I do not have the STM32F76x hardware. So this commit very likely breaks the LTDC/DMA2D. However, it was probably not left in a functional state anyway so I do not think that there is any loss.
Squashed commit of the following:

    arch/arm/src/stm32f7:  Some minor changes for clean compilation of LTDC.
    arch/arm/src/stm32f7:  Add overly support for LTDC driver header file.
    arch/arm/src/stm32f7:  Add overly support for LTDC driver file.
    arch/arm/src/stm32f7:  Add overly support for DMA2D driver header file.
    arch/arm/src/stm32f7:  Finishes overly support for DMA2D driver.
    arch/arm/src/stm32f7:  Partial overly support in DMA2D driver (a lot more to be donw)
    arch/arm/src/stm32f7/chip:  Clone overlay DMA2D register definitions from F4
    arch/arm/src/stm32f7:  Clone overlay configuration from stm32 F4
2018-06-15 13:13:12 -06:00
Kurt Kiefer
ba1f8e5474 Merged in kekiefer/nuttx/stm32f7-serial-fix-tiocssinglewire-upstream (pull request #658)
stm32f7: serial: Fix ioctl TIOCSSINGLEWIRE

The TRM notes that UE must be disabled in order to write HDSEL in
USART_CR3. This was not being done, so calls to TIOCSSINGLEWIRE were
silently failing.

This change checks the state of UE in USART_CR1, clears the UE bit
before writing HDSEL, then re-enables it if neccesary.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-14 13:27:07 +00:00
Masayuki Ishikawa
a7a258e05e Merged in masayuki2009/nuttx.nuttx/lc823450_bt (pull request #657)
lc823450 bt

* arch/arm/src/lc823450: Fix H/W flow control in lc823450_serial.c

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

* configs/lc823450-xgevk: Add lc823450-xgevk/bt configuration

    NOTE: This configuration requires external bluetooth stack.

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-13 12:50:12 +00:00
Gregory Nutt
05ad7208e7 configs/imxrt1050-evk: Add knsh configuration.. PROTECTED mode NSH build. 2018-06-08 16:27:14 -06:00
Gregory Nutt
8d7333710e Trivial coding standard fix. 2018-06-08 11:14:28 -06:00
Marco Krahl
084a90b468 Merged in MarcoKrahl/nuttx/ltdc (pull request #654)
LTDC fixes

* stm32_ltdc: Allows to use ltdc without overlay support

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32: Removes overlay dependency when LTDC is enabled

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32: Allows to configure initial chromakey for LTDC layer

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32_ltdc: Fixes another compiler warning when dma2d is disabled

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32_ltdc: Checks for register reload is done before continued

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32f429i-disco: Fixes eliminated register control by compiler optimization

    When reading 1 byte from the SPI device the clock must be enabled and
    immediately disabled. This section has been optimized by the compiler (-O2) to a
    missing active spi clock. A subsequently block read failed because of missing
    response from the spi device. This has been lead to a broken display
    initializing.

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-06-08 13:24:57 +00:00
Gregory Nutt
a94e3284b3 syslog: Enable is partial, crippled version of syslog_flush(); arch/: Call syslog_flush() from assertion handling logic. 2018-06-07 16:29:16 -06:00
Gregory Nutt
8aa486515e arch/: Correct critical section logic associated with the recent signal handler changes (yet again). 2018-06-06 17:39:10 -06:00
Gregory Nutt
b5c6d9c849 Update some comments. 2018-06-06 17:20:01 -06:00
Gregory Nutt
a581d7c2e3 arch/: Relasted to last big change to force interrupts to be disabled. In the SMP case, we still must call leave_critical_section() at least once in order to compensate for the fact that the irqcount was incremented in up_schedsigaction(). 2018-06-06 17:04:12 -06:00
Marco Krahl
5b96a26c1b Merged in MarcoKrahl/nuttx (pull request #653)
Fixes compiler errors when using LTDC and DMA2D

* stm32: ltdc and dma2d are are depends on FB_OVERLAY support

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32_dma2d.h: Makes interface available when FB_OVERLAY is enabled

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32_ltdc: Fixes compiler error when blit support is disabled

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32f429i-disco: Updates lvgl board example

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32f429i-disco: Updates nxwm board example

    Still nxwm_main is missing.

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-06-06 21:17:57 +00:00
Gregory Nutt
6c1ea7983a Eliminate a 'Declaration isnt a prototype' warning. 2018-06-06 14:33:19 -06:00
Gregory Nutt
c2755517a9 arch/arm/src/smt32: Kconfig: Select CONFIG_FB_OVERLAY if DMA2D is enabled. Fix some compile issues in stm32_ltdc.c when CONFIG_FB_OVERLAY_BLIT is not enabled. 2018-06-06 13:07:20 -06:00
Gregory Nutt
6230ab01b6 arch/arm/include/armv7-m: Last change requires inclusion of chip.h for definition. 2018-06-06 10:38:51 -06:00
Marco Krahl
af9bf8d721 Merged in MarcoKrahl/nuttx/ltdc (pull request #652)
ports stm32 ltdc and stm32 dma2d to framebuffer interface

* stm32: Removes current dma2d and ltdc implementation for replacement

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32f429i-disco: Removes obsolete functions call

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32_dma2d: Adds pixel format and transparency definitions

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32_dma2d: Adds interface definition

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32_dma2d: Reimplements dma2d driver

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32_ltdc: Adds interface definition

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32_ltdc: Reimplements ltdc driver

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32: Updates LTDC and DMA2D Kconfig definitions

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32f429i-disco: Fix compile error when ldc debug is enabled

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32f429i-disco: Adds helper script for frambuffer and heap2 calculation

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32f429i-disco: Update README for framebuffer configuration

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32f429i-disco: Update board configuration of framebuffer example

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-06-06 16:05:05 +00:00
Gregory Nutt
977d41d519 Based on a change recommended by Mark Shulte:
Signal handlers maybe run with interrupts enabled or disabled, depending on how the task the received the signal was blocked. (i.e.: If sem_wait() is called, then we disable interrupts, then block the currently running task). This could be dangerous, because user code would be running with interrupts disabled.

This change forces interrupts to be enabled in up_sigdeliver() before executing the signal handler calling up_irq_enable() explicitly.  This is safe because, when we return to normal execution, interrupts will be restored to their previous state when the signal handler returns.
2018-06-06 09:54:30 -06:00
Gregory Nutt
9222f50e1c arch/: Make sure the up_irq_enable() is available on all architectures. I will not be able to test all of these new versions of this function so this may break things for awhile. 2018-06-06 09:25:40 -06:00
Gregory Nutt
f88a4c6ea8 arch/risc-v/src: Make code follow pattern of other architectures better. Fix some coding standard issues. 2018-06-06 07:46:50 -06:00
Juha Niskanen
e0aa6ed48c arch/arm/src: Change ASSERT macros to DEBUGASSERT. 2018-06-06 06:34:14 -06:00
Gregory Nutt
88cf9f1d3f arch/arm/src/stm32/stm32f10xxf30xx_flash.c: Trivial simplification. 2018-06-05 13:21:52 -06:00
Gregory Nutt
6fd4caf00f Implemente support for STM32 F1 banked FLASH
Squashed commit of the following:

    arch/arm/src/stm32/stm32f10xxf30xx_flash.c:  Re-implemented Dmitriy Linikov's change to support multi-banked FLASH on the STM32 F1 parts AFTER separating the FLASH support by architecture and implementing more standard base+offset register addressing.  Now the change goes in rather cleanly.
    arch/arm/src/stm32/stm32f10xxf30xx_flash.c:  Use base + offset address to simplify implementation of dual bank flash.
2018-06-05 12:50:55 -06:00
Masayuki Ishikawa
fb07bd7e27 Adds loopback test for digital MIC on lc823450 via i2schar driver.
Squashed commit of:

  configs/lc823450-xgevk: Enable DMDIN0 (Digital MIC)
  I2S: Add ioctl interface to i2s_ops_s and i2schar driver
  arch/arm/src/lc823450: Add DGMIC in lc823450_i2s.c
  configs/lc823450-xgevk: Add i2schar driver to lc823450_wm8776.c
  configs/lc824350-xgevk: Enable AUDIO_I2SCHAR in audio/defconfig
  configs/lc823450-xgevk: Update README.txt
2018-06-05 10:34:22 -06:00
Gregory Nutt
1f2e7f4b52 arch/arm/src/stm32: CONFIG_STM32_FLASH_WORKAROUND_DATA_CACHE_CORRUPTION_ON_RWW option applies only to F2 and F4. 2018-06-05 10:20:50 -06:00
Gregory Nutt
1a03201600 STM32 FLASH logic has reached a limit in complexity and, hence, needs to be divided into multiple C files of lower complexity.
Squashed commit of the following:

    arch/arm/src/stm32/stm32f10xxf30xx_flash.c:  Be consistent in file naming.
    arch/arm/src/stm32l10xxf30xxx_flash.c:  Separate STM32F10xx and STM32F30xx FLASH logic into a separate file.
    arch/arm/src/stm32l20xx40xxx_flash.c:  Separate STM32F20xx and STM32F40xxFLASH logic into a separate file.
    arch/arm/src/stm32l15xx_flash.c:  Separate STM32L15xx FLASH logic into a separate file.
2018-06-05 09:46:18 -06:00
Dmitriy Linikov
6cb4854503 arch/arm/src/stm32/chip/stm32_flash.h: Add register definitions for F1 parts that have dual banked FLASH. 2018-06-05 08:49:17 -06:00
Dmitriy Linikov
a7b2d7104a arch/arm/src/stm32: Added progmem interface support for STM32F20XX 2018-06-05 07:36:49 -06:00
Gregory Nutt
b020ee13b8 Remove excute bit from permissions on two .h files. 2018-06-03 09:36:01 -06:00
Gregory Nutt
d52c63f632 Change all references from OSX to macOS 2018-06-01 13:25:50 -06:00
Gregory Nutt
de119e8589 Various fixes necessary to build the simulator under MSYS. 2018-05-31 13:25:04 -06:00
David Sidrane
b2edfac2dd kinetis:kinetis_lowputc Fixed parity settings.
Kinetis UART must be placed in 9 bit mode (M=1) with when 8 bit
  data with parity is required. If left in 8 bit mode (M=0) with
  parity then D7 of the TX/RX register becomes parity bit. Hence
  what is called 9-bit or 8-bit Mode Select is a misnomer.
  8 bit mode when parity is enabled is realy 7 bit with parity.
2018-05-30 07:00:55 -06:00
Gregory Nutt
f9819e1f5f arch/arm/src/kinetis: Fix bad spacing in last commit. 2018-05-30 07:00:33 -06:00
David Sidrane
46999f9474 kinetis:kinetis_lowputc fix BRFA calculation effecting baudrate
Previous BRFA was not cleared and or-ed into new BRFA, hence
  buadrate was wrong.  Where Baud Rate Fractional Divisor (BRFD)
  UART baud rate = clock / (16 * (SBR + BRFD))
2018-05-30 06:58:21 -06:00
Gregory Nutt
f2a89813f2 Build system: Remove fixed lib/ subdirectory and its content. Replace with new directory called staging/ that is created dynamically when building and removed when 'make clean' is done. This both improves the name and eliminates a garbage directory from the repository. 2018-05-29 11:36:21 -06:00
Alan Carvalho de Assis
d260d9e703 arch/arm/src: Fix small typo where I2S is referenced as I2C 2018-05-27 16:23:03 -06:00
Alan Carvalho de Assis
b1801f3fd3 tools: Add tools/initialconfig to .gitignore 2018-05-26 09:22:57 -06:00
Gregory Nutt
548cd2892a arch/arm/src/imxrt and configs/imxrt1050-evk: Add PHY access support needed to support the network monitor. Cannot enable it yet... I am getting hardfaults when I enable the PHY interrupt. 2018-05-25 13:02:41 -06:00
Jake Choy
8601d767cc This commit adds an i.MX RT Ethernet drivers.
Squashed commit of the following:

Author: Gregory Nutt <gnutt@nuttx.org>
    arch/arm/src/imxrt:  Add cache operations to permit the Ethernet driver to work with the D-Cache enabled, at least in write-through mode.

Author: Jake Choy <jakearcx@gmail.com>
    arch/arm/src/imxrt:  The Ethernet driver is now functional, at least with the D-Cache off.  The final fix was for the reference clock that needs to be forced to provide and input (SION).

Author: Gregory Nutt <gnutt@nuttx.org>
    Fix trivial coding standard issue.
    configs/imxrt1050-evk:  Correct CONFIG_RAM_SIZE in all configurations (5Kb not 5Mb).  I don't believe that CONFIG_RAM_SIZE is used at all in the i.MX RT so this is as grievous an error as it seems.  Also enabled built-in applications in all NSH configurations.
    arch/arm/src/imxrt/imxrt_enet.c:  Trivial and cosmetic.
    Cosmetic update to comments.
    arch/arm/src/imxrt/imxrt_enet.c:  Oops.. put the PHY interrupt init hooks in the wrong place.  That is a one-time initialization but imxrt_initphy() is called on each ifup.
    arch/arm/src/imxrt/imxrt_enet.c:  Add hooks for board-specific PHY initialization (not yet needed, but there when needed).
    Remove dangling white space at the end of lines
    arch/arm/src/imxrt/Kconfig:  Add option for board-specific PHY initialization.
    configs/imxrt1050-evk/src:  Add basic logic to support PHY interrupts.  Incomplete.. needs additional support in imxrt_enet.c to 1. call to initialize PHY interrupt features, and 2. IOCTL commands to access PHY registers.
    configs/imxrt1050-evk/README.txt: Trivial update.
    configs/imxrt1050-evk/netnsh/defconfig:  Disable LED support because pins conflict with PHY.  Enable device statists.  Enable NSH ifup and ifdown commmands
    arch/arm/src/imxrt:  Use macros in imxrt_periphclks.h vs. direct CCM CCGR accesses in Ethernet driver.
    arch/arm/src/imxrt:  Misc changes for a clean compilation of Ethernet deriver.  configs/imxrt1050-evk/netnsh:  Add an NSH configuration for testing Ethernet.

Author: Jake Choy <jakearcx@gmail.com>
    arch/arm/src/imxrt:  Initial WIP Ethernet driver.
2018-05-25 09:36:23 -06:00
Gregory Nutt
e07504291e configs/imxrt1050-evk: Fix OCRAM size used in linker script. 2018-05-24 16:51:18 -06:00
Gregory Nutt
8edbf04a0d /arch/arm/src/imxrt/imxrt_edma.c: Correct arguments to arch_clean_dcache() and arch_invalidate_dcache(). 2018-05-24 09:41:46 -06:00
Gregory Nutt
c9be3dd387 arch/arm/src/imxrt/imxrt_edma.c: Fix some issues with adding a new TCD to the end of a scatter/gather chain: Was not correctly writing back the new tail pointer; Need to flush the previous TCD in the chain whose fields were modify to link to the new TCD. 2018-05-23 20:29:20 -06:00
Gregory Nutt
618d264e1d arch/arm/src/imxrt: There is a separate interrupt vector for DMA channel error interrupts. 2018-05-23 06:52:41 -06:00
Gregory Nutt
db0cdfc407 Squashed commit of the following:
arch/arm/src/imxrt:  May eDMA channel linking a configuration option.  Add support to select the DMA channel priority and pre-emption controls.
    arch/arm/src/imxrt:  Update some HowTo comments in the eDMA header file.
    arch/arm/src/imxrt:  Fix a logic error in parmater passing.  Caller does not know actual channel number when setting up linked channel, only the channel handler.
2018-05-22 15:28:28 -06:00
Gregory Nutt
890656f043 Squashed commit of the following:
arch/arm/src/imxrt:  Fixes for clean eDMA driver build with Scatter/Gather enabled.
    arch/arm/src/imxrt:  Fixes for clean eDMA driver build with Scatter/Gather disabled.
    arch/arm/src/imxrt:  Add flags to DMA configuration to control transfer setup.  Remove some user interfaces that are inconsistent with modular design.
    arch/arm/src/imxrt:  Update DMA channel interrupt handler.
    arch/arm/src/imxrt:  Add implementation of eDMA imxrt_dmach_start().
    arch/arm/src/imxrt:  Add implementation of eDMA imxrt_dmach_setup().
    arch/arm/src/imxrt:  Add eDMA imxrt_tcd_chanlink().
    arch/arm/src/imxrt:  Add eDMA imxrt_dmach_getcount; free allocated TCDs automatically when the DMA completes or is aborted.
2018-05-22 11:39:37 -06:00
Gregory Nutt
1cf676344e Squashed commit of the following:
arch/arm/src/imxrt:  Add structures to support list of TCDs for Scatter/Gather DMA.
    arch/arm/src/imxrt:  Add eDMA imxrt_dmach_initconfig().
    arch/arm/src/imxrt:  Add eDMA imxrt_tcd_instantiate().
    arch/arm/src/imxrt:  Replacing some of the logic cloned from SAMv7 XDMAC with eDMA logic from NXP sample code.  I am thinking that the eDMA is too complex to force into the same pattern as for other MCUs.
    arch/arms/src/imxrt/imxrt_edma.c:  Add support for in-memory TCDs.
    arch/arm/src/imxrt/chip:  Add an in-memory representation of the TCD in imxrt_edma.h
2018-05-21 11:46:16 -06:00
Michael Jung
5e479f31ba arch/arm/src/lpc17xx/lpc17_usbdev: Fix typo introduced with last change 2018-05-21 06:13:30 -06:00
Michael Jung
fe44948ea4 arch/arm/src/lpc17xx/lpc17_usbdev.c: Fix loss of RX initiatives. USB bulk endpoints are double buffered on LPC17xx MCUs. This means that up to two packets might be received on an OUT endpoint that can not be handled immediately if the receive request queue is empty. Thus, rxpending must be a counter not a boolean flag. 2018-05-20 12:42:30 -06:00
Gregory Nutt
cce5d017b4 arch/arm/src/imxrt: Fix some eDMA interrupt controls. 2018-05-20 12:21:36 -06:00
Gregory Nutt
20f1597fa5 arch/arm/src/imxrt: IOMUXC logic now uses peripheral clock helpers (I think it was enabling the wrong clocks anyway). Minor updates to eDMA logic. 2018-05-20 12:02:50 -06:00
Gregory Nutt
9c9c0eb4d5 arch/arm/src/imxrt: Add eDMA interrupt decode logic. 2018-05-20 10:59:36 -06:00
Gregory Nutt
87df439909 arch/arm/src/imxrt: Add eDMA initialization logic. 2018-05-20 10:34:27 -06:00
Gregory Nutt
0f6aeb7cff arch/arm/src/imxrt: Centralilze and standardize control of peripheral clocking. Add logic to initialize the DMAMUX. 2018-05-20 10:03:45 -06:00
Alan Carvalho de Assis
cc1d68bd92 arch/arm/src/stm32: Include needed headers to get stm32_i2s.c compiled
configs/stm32f4discovery/include/board.h: Add SPI DMA pins definitions to get CS43L22 audio DAC working
configs/stm32f4discovery/audio: Add board configuration for CS43L22 audio example
configs/stm32f4discovery:  Update README
2018-05-19 16:12:21 -06:00
Gregory Nutt
10ec45ae9e configs/stm32l1discovery: Add support for the STM32L152RCT6 version. 2018-05-18 11:34:55 -06:00
Dmitriy Linikov
76f0e68812 arch/arm/src/stm32: Added Vbat measurement to adc driver for STM32F20xx and STM32F4xxx.
As with the MCU temperature and VREFINT measurement, this patch requires user to enable the corresponding channel first. For Vbat channel the ioctl cmd is IO_ENABLE_DISABLE_VBAT_CH, and its arg should be a pointer to bool which must be true to enable and false to disable the Vbat channel.

Moreover, since Vbat input contains a built-in voltage divider, it is highly suggested to disable Vbat input channel after measurement is done in order to prevent battery drain through the divider.
2018-05-18 06:45:46 -06:00
Gregory Nutt
fe364ba1f4 arch/arm/src/imxrt: A little more eDMA logic. Slow progress. 2018-05-17 14:23:58 -06:00
Gregory Nutt
1acc765156 arch/arm/src/imxrt: A little more DMA-related logic. Still no significant logic in place. 2018-05-17 09:48:45 -06:00
Gregory Nutt
f91c3666a1 arch/arm/src/imxrt: A little more DMA logic. Still far from complete. 2018-05-16 16:20:30 -06:00
Gregory Nutt
ea8d78c9c5 arch/arm/src/imxrt: Add framework for eDMA support. Initial port is a rip off from the SAMA5Dx and is little more than the framework for the DMA support. 2018-05-16 14:28:22 -06:00
Gregory Nutt
9bb4a80838 arch/arm/src/imxrt/chip: Remove un-necessary TCD structure. 2018-05-16 12:35:10 -06:00
Gregory Nutt
3b355d52f2 arch/arm/src/imxrt/chip: Add more eDMA register definitions. Still missing TCD definitions. 2018-05-16 12:01:05 -06:00
Gregory Nutt
8f0b87a2d9 arch/arm/src/imxrt/chip: Add more eDMA register definitions. Still missing bit-field definitions. 2018-05-16 09:49:48 -06:00
Jake Choy
4638e3f4c7 rch/arm/src/imxrt/chip: Add Ethernet pin properties. 2018-05-16 07:50:24 -06:00
Gregory Nutt
79ab957982 arch/arm/src/imxrt/chip: Add DMA MUX register definition header file. 2018-05-16 07:25:37 -06:00
William Douglas
c708f66aea Squashed commit of the following:
commit 7fd1f0d78546fa0315f4077b779efdd884e5bd53
Author: William Douglas <william@rocklandscientific.com>
Date:   Tue May 15 13:19:31 2018 -0700

    Add support for the second SDMMC device.

    The second SDMMC device was already supported but
    the clock was never enabled.  This fixes that.
2018-05-15 17:08:20 -06:00
Gregory Nutt
2b2f3bf263 arch/arm/src/imxrt/chip: Add DMA channel assignments. 2018-05-15 14:44:33 -06:00
Jake Choy
034ab467e6 arch/arm/src/imxrt: Corrects some IOMUX controls. 2018-05-15 10:16:57 -06:00
Gregory Nutt
c82724d462 arch/arm/src/imxrt: Add missing support for the Cortex-M7 caches; configs/imxrt1050-evk: Enable I- and D-Caches in the nsh configuration. Calibrate the delay loop. Add support for the on-board LED. 2018-05-15 10:05:16 -06:00
Gregory Nutt
c681519720 arch/arm/src/imxrt/imxrt_serial.c: Fix some interrupt instabilities; must be in a critical section when modifying serial interrupts. configs/imxrt1050-evk/nsh/defconfig: Use the BASEPRI register to enable/disable interrupts; enable the PROCFS file system. 2018-05-15 07:50:19 -06:00
Gregory Nutt
2fa738e08c arch/arm/src/imxrt: Various fixes from attempt at initial bringup. 2018-05-14 16:07:34 -06:00
Gregory Nutt
3a34b29f76 arch/arm/src/imxrt/chip: Add pin multiplexing header files. 2018-05-14 13:29:53 -06:00
Gregory Nutt
aec56484ab arch/arm/src/kinetis + SDHC configs: Make Kinetis SDHC pullups work the same as the STM32 SDIO pullups 2018-05-12 17:12:58 -06:00
Alan Carvalho de Assis
df3d9dd357 arch/arm/src/stm32: Add internal pull-up option for SDIO pins (also picks up an unrelated change to a README.txt file) 2018-05-12 17:08:32 -06:00
Gregory Nutt
ce7dcfcd12 arch/arms/src/imrxt: Correct a few logic mistakes in the i.MX RT serial driver. 2018-05-11 07:52:48 -06:00
Gregory Nutt
4a9a421c34 Back out part of f4bcaa4fc2dc2f06d5632d3b74f43c25a6e7e845.If CONFIG_ARCH_IDLE_CUSTOM is defined, then it should not use the version of lc823450_idle.c in arch/arm/src/lc823450. That part was correct before the PR. If CONFIG_ARCH_IDLE_CUSTOM, then the build should use a custom IDLE loop in the board src/ directory. 2018-05-11 06:26:01 -06:00
Masayuki Ishikawa
f4bcaa4fc2 Merged in masayuki2009/nuttx.nuttx/fix_lc823450_build_errors (pull request #638)
arch/arm/src/lc823450: Fix some recently introduced build issues

Reported-by: Wig Cheng <wig.cheng@relajet.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-05-11 12:19:29 +00:00
Michael Jung
29af41a85f libc/unistd: Initial, minimal implementation of sysconf(). Only sufficient to support the functionality of less standard getdtabilesize(). 2018-05-10 14:08:34 -06:00
Jake Choy
93c94aadf8 arch/arm/include/imxrt/imxrt105x_irq.h: Fixed incorrect/duplicate gpio irq defines. 2018-05-08 09:46:02 -06:00
Gregory Nutt
6435a2b25b arch/mips/src: All MIPS architctures now support CONFIG_ARCH_IDLE_CUSTOM 2018-05-07 11:17:19 -06:00
Gregory Nutt
bd455c9e46 arch/arm/src: All ARM architctures now support CONFIG_ARCH_IDLE_CUSTOM 2018-05-07 10:13:20 -06:00
Michael Jung
3acffb0c5c arch/arm/src/lpc17xx: Add support for ARMv7-M run time stack checking on NXP LPC17xx MCUs based on CONFIG_ARMV7M_STACKCHECK. Basically copied from stm32. 2018-05-06 07:06:52 -06:00
Gregory Nutt
b5a4d6d9ef configs/freedom-k28f: With these changes to the configuration, the NSH configuration is now functional on the k28f board. Also fixes corrects the active logic level for the RGB LED. arch/arm/src/kinetis/chip: Fixes an error in vector configuration. 2018-05-05 09:33:48 -06:00
Gregory Nutt
2a84a75bcf arch/arm/src/nrf52/nrf52_flash.c: Add missing erasesize method. Add missing function header comments. 2018-05-05 06:49:18 -06:00
Alan Carvalho de Assis
e4e4e63164 arch/arm/src/nrf52: Add nRF52 Flash PROGMEM support 2018-05-04 18:19:36 -06:00
Gregory Nutt
7534a3d554 arch/arm/src/kinetis: Grrr.. fix a backward conditional test in last commit. 2018-05-04 17:46:14 -06:00
Gregory Nutt
399b4ba69d arch/arm/src/kinetis: Eliminate a warning when no UARTs are enabled. 2018-05-04 17:40:33 -06:00
Gregory Nutt
e047145363 arch/arm/src/kinetis: Fix some bit numbering errors in K28F USB HS header file. 2018-05-04 15:02:09 -06:00
Ramtin Amin
544d2a079f arch/arm/src/kinetis: Add USB HS header file. 2018-05-04 14:36:50 -06:00
Gregory Nutt
8c81b97148 Squashed commit of the following:
configs/freedom-k28f:  Add button and LED support.
    arch/arm/src/kinetis:  Fix a couple of additional compile problems.
    arch/arm/src/kinetis/chip and configs/freedom-k28f:  Add things needed for a successful build.  Still need board LED definitions.
2018-05-04 12:04:08 -06:00
Gregory Nutt
3755b0b6ef arch/arm/src/kinetis: Add pin multiplexing definitions for the K28F. 2018-05-04 10:19:00 -06:00
Gregory Nutt
21120057e8 Squashed commit of the following:
arch/arm/src/kinetis:  The K28F Kinetis MPU is almost the same as the K66F MPU.
     arch/arm/src/kinetis:  The K28F Kinetis FMC is the same as the K66F FMC.
2018-05-04 08:01:21 -06:00
Gregory Nutt
fa775661e7 And additional change that is needed with the previous commit. 2018-05-03 15:23:38 -06:00