Commit Graph

14019 Commits

Author SHA1 Message Date
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