Commit Graph

13996 Commits

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