Commit Graph

15363 Commits

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

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

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

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

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

* arch: arm: Add ARCH_GLOBAL_IRQDISABLE to ARCH_CHIP_CXD56XX in Kconfig

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

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

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

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

* arch: arm: cxd56xx: Add support for SMP

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

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

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

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

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

* boards: spresense: Add smp configuration

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

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

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

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

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

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

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

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

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

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

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

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

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

* arch: arm: cxd56xx: Fix LPADC configuration

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

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

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

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

    Fix a problem that error interrupts are not cleared.

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

* arch: arm: cxd56xx: Fix sdhci semaphore

    Fix inital value of semaphore in sdhci drive.r

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

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

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

* boards: cxd56xx: Remove initial setting of PIN_AP_CLK

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

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

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

const unsigned char bt_firmware_hcd -> The bt firmware array.

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

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

* stm32_pwr:Ensure data is flushed on backup domain access changes

* stm32h7:bbsram convince compiler to perform 32 bit write

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-26 18:34:25 +00:00
Alin Jerpelea
3806a01c5d Merged in alinjerpelea/nuttx (pull request #1024)
noards: arm: cxd56xx: migrate common code

* boards: arm: cxd56xx: common: move boot to common

    This is a common function and can be reused by all boards.

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

* boards: arm: cxd56xx: common: move flash to common

    This is a common function and can be reused by all boards.

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

* boards: arm: cxd56xx: common: move I2C driver to common

    This is a common function and can be reused by all boards.

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

* boards: arm: cxd56xx: common: move uid to common

    This is a common function and can be reused by all boards.

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

* boards: arm: cxd56xx: common: move usbmsc to common

    This is a common function and can be reused by all boards.

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

* arch: arm: cxd56: add SPH

    The SPH is used by the ASMP implementation from the SDK.

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-26 14:29:55 +00:00
Bernd Walter
f9e80c4a1e arch/arm/src/samd2l2/sam_i2c_master.c: Correct time calculation. 2019-08-26 08:08:56 -06:00
Michael Jung
decd07725f arch/arm/src/stm32/stm32_spi.c: TI Synchronous Serial Frame Format. The SPI macros on STM32 MCUs do support the Texas Instruments Synchronous Serial Frame Format protocol (TI protocol). Defined a new SPIDEV_MODETI and add support for it in stm32_spi.c. 2019-08-25 09:07:09 -06:00
Michael Jung
b395cde043 arch/arm/src/stm32: PLLI2S support for F427/F437. Enable support of the I2S Phase Locked Loop on STM32F427 and STM32F437 MCUs. 2019-08-25 09:01:35 -06:00
David Sidrane
e2d76e21d5 Merged in david_s5/nuttx/master_h7_typo (pull request #1023)
stm32h7:Memory Map DBGMCU is @ 0x5c001000

Fixtypo

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-24 11:27:23 +00:00
David Sidrane
c7dab20318 Merged in david_s5/nuttx/master_h7 (pull request #1022)
stm32h7:Memory Map DBGMCU is @ 0x5c001000

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-23 22:00:43 +00:00
Gregory Nutt
b3d609959c arch/arm/src/s32k1xx/hardware/s32k1xx_flexcan.h: Add an incomplete FlexCAN register definition header file. Still missing some bitfield definition. Also updates some README files. 2019-08-23 07:35:49 -06:00
Alin Jerpelea
6ecee7e403 Merged in alinjerpelea/nuttx (pull request #1021)
boards: cxd56xx: add SCU sensors (2/2)

* boards: cxd56xx: add cxd56_bh1721fvc initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

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

* boards: cxd56xx: add cxd56_bh1745nuc initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

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

* boards: cxd56xx: add cxd56_bm1383glv initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

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

* boards: cxd56xx: add cxd56_bm1422gmv initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

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

* boards: cxd56xx: add cxd56_bmi160 initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

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

* boards: cxd56xx: add cxd56_bmp280 initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

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

* boards: cxd56xx: add cxd56_kx022 initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

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

* boards: cxd56xx: add cxd56_lt1pa01 initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

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

* boards: cxd56xx: add cxd56_rpr0521rs initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

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

* boards: cxd56xx: add cxd56_sensors initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

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

* arch: arm: cxd56: add Backup Log driver

    The driver will be used to backup logs on crash.

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

* boards: arm: cxd56xx: common: add crashlog driver

    Add Crashlog driver with support for reset on crash

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

* boards: arm: cxd56xx: move gs2200m initialization

    Move the board gs2200m initalization to the common board folder

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

* boards: arm: cxd56xx: move ili9340 initialization

    Move the board ili9340 initalization to the common board folder

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

* boards: arm: cxd56xx: move lpm013m091a initialization

    Move the board lpm013m091a initalization to the common board folder

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

* boards: arm: cxd56xx: common: typo fixes

    HEADER: Updates on file location
    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-23 13:28:35 +00:00
Gregory Nutt
686ef9b317 arch/arm/src/s32k1xx: Clocking logic was including the wrong 'clock name' files for the S32K11x family. 2019-08-22 10:57:28 -06:00
Gregory Nutt
50e56f1d50 arch/arm/src/s32k1xx/Kconfig: Remove a duplicate configuration setting. Noted by Fabio Balzano. 2019-08-22 10:22:40 -06:00
Gregory Nutt
04dda09ed1 arch/arm/src/s32k1xx/Kconfig: Add Ethernet configuration options that were supposed to have been included in a previous commit. 2019-08-21 17:43:36 -06:00
Nathan Hartman
92bf3bfece arch/arm/src/tiva/hardware/tm4c: Fix wrong description on define TIVA_1WIRE_BASE: Was "EEPROM and Key Locker" (same as the item above). Now "1-Wire Master Module." Make DMACTL symbols visible for TM4C123: Remove "#ifdef CONFIG_ARCH_CHIP_TM4C129" guard around UART DMA Control (DMACTL) symbols. These bits are valid on TM4C123 devices, as well as on TM4C129. Also, improve the comment on UART_DMACTL_DMAERR. 2019-08-21 17:41:24 -06:00
Gregory Nutt
962ccb0f68 arch/arm/src/s32k1xx: This is a rough port of the i.MXRT Ethernet driver to the S32K1xx. The i.MXRT uses the same IP. Completely untested at this point. 2019-08-21 17:33:54 -06:00
Gregory Nutt
b4ee19f5bd arch/arm/src/s32k1xx: This commit brings in the LPSPI and LPI2C peripheral drivers from the i.MXRT which used the identical IP.
Squashed commit of the following:

    arch/arm/src/s32k1xx:  Update peripheral input clocking for the way that things are done for the S32K1XX.  Fix other misc. compilation/configuration issues.

    arch/arm/src/s32k1xx:  Clean up LPSPI and LPI2C naming for S32K1XX.  Using S32K1XX clock functions to get peripheral input clock.

    arch/arm/src/s32k1xx:  Clone i.MXRT LPSPI and LPI2C support.  i.MXRT uses the same IP as S32K1XX.
2019-08-21 11:18:40 -06:00
Nathan Hartman
be5a40c656 Fix typos in comments. 2019-08-21 09:32:59 -06:00
Ivan Ucherdzhiev
19c070e0d1 drivers/mmcsd: Added support for MMC(eMMC) bigger than 2 GB (Tested with IMXRT1050EVKB and samsung eMMC 16GB). arch/arm/src/imxrt: IMXRT uSDHC driver cmd line reset logic modified. 2019-08-21 09:23:29 -06:00
Gregory Nutt
c6026d7500 With these changes the S32K146EVB minimal NSH is function. Only verifed while running from SRAM.
arch/arm/src/s32k1xx/s32k1xx_lowputc.c:  Fix a typo that prevented LPUART1 from working.
    arch/arm/src/s32k1xx/s32k1xx_periphclocks.c and related files:  Fix yet another case of confusion between pre-decremented and non-decremented divider values.  Enforce the rule that dividers are not decremented until the moment they are written into registers.
    arch/arm/src/s32k1xx/s32k1xx_clockconfig.c:  Fix another problem related to whether a divider is pre-decremented or not.  The answer must be the divder values are never pre-decremented.  They are decremented just before being written to hardware.
    arch/arm/src/s32k1xx/s32k1xx_clockconfig.c:  Clean up some bad conditional logic.  Precedence of operators problem.
    boards/arm/s32k1xx/s32k118evb:  Add support for execution out of SRAM.  This is helpful for bringup when you want to avoid putting a lethal image in FLASH.
    arch/arm/src/s32k1xx/s32k1xx_clockconfig.h:  Remove crystal frequency, it is not used.
    arch/arm/src/s32k1xx/s32k1xx_wdog.h:  Fix a typo in a register name.i
    boards/arm/s32k1xx/s32k*evb/configs/nsh/defconfig:  Create Motorola SREC output format.
2019-08-20 14:35:36 -06:00
David Sidrane
64fb11c1b8 Merged in david_s5/nuttx/master_h7 (pull request #1012)
Master h7

* stm32h7:spi allow more clock sources

* stm32h7 has ARCH_HAVE_I2CRESET

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-20 14:41:13 +00:00
David Sidrane
0f6db4e1db Merged in david_s5/nuttx/master_h7 (pull request #1011)
Master h7

* stm32h7: DMA Fix compiler warning

* stm32h7: DMA Fix coding style

* stm32h7:serial fix undefined with TERMIOS

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-20 11:49:38 +00:00
Gregory Nutt
faf8bdcbf8 Eliminate some new warnings found in build testing 2019-08-19 17:50:04 -06:00
David Sidrane
d20d0227ae Merged in david_s5/nuttx/master_h7 (pull request #1008)
stm32h7:Ported UID from F7

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-19 22:21:11 +00:00
David Sidrane
a9e72bb58d Merged in david_s5/nuttx/master_h7 (pull request #1007)
stm32h7:Port DTCM from F7

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-19 20:42:52 +00:00
Gregory Nutt
df1294906d arch/arm/src/s32k1xx/s32k1xx_clockconfig.c and related files: Fix confusion about who decrements the rster value. Some dividers may have a function range of 1..8 but the register value is 0..7. There were several places where values were getting decremented twice: Once by higher up logic and once by the register access logic. A such dividers were reviewed and, hopefully, all were fixed. 2019-08-19 13:07:45 -06:00
Ivan Ucherdzhiev
a383a86e72 arch/arm/src/imxrt/imxrt_usdhc.c: uSDHC typo fixes and command transfer error handling modified. 2019-08-19 11:01:58 -06:00
Nathan Hartman
198723b90d arch/arm/src/tiva/common/tiva_serial.c: Fix some typos in comments. 2019-08-19 10:57:00 -06:00
Gregory Nutt
33ab25ae14 arch/arm/src/s32k1xx/s32k14x and boards/arm/s32k1xx/s32k146evb/src: Numerous fixes to get a clean build of the S32K146EVB. 2019-08-19 10:49:50 -06:00
Gregory Nutt
c3f16a46f0 This commit brings the S32K118EVB board to code complete and ready for testing. This commit adds some minor initialization fixes (like disabling the WDOG, enabling the I-cache, and initializing the MPU. It brings more files in from the Kinetis port for the IDLE loop and for GPIO functionality. This also address register definition header file for LMEM and MPU. 2019-08-18 17:26:10 -06:00
Gregory Nutt
db0641556e boards/arm/s32k1xx/s32k118evb: Implement board support for LEDs and buttons. This is taken from the Freedom-K66f with has the same LED and button configuation as the S32K116EVB and uses the same GPIO IP.
boards/arm/s32k1xx/s32k118evb/include/board.h:  Add LPUART0 pin disambiguation.

arch/arm/src/s32k1xx/hardware:  Add pin mux definitions for S32K116, 118, 142, 144, 146, and 148.

arch/arm/src/s32k1xx/s32k1xx_pin.c and .h:  Add support for PIDR register that disables a gneral purpose pin from acting as an input.

arch/arm/src/s32k1xx/s32k1xx_pin.c and .h:  The device does not support slew rate controls or open drain (on all the pins).  Only pins that are configured for a protocol that requires open-drain (e.g;, LPI2C, LPUART single-wire) will work in open-drain mode.
2019-08-18 12:02:54 -06:00
Gregory Nutt
e0d1535a1e arch/arm/src/s32k1xx/s32k1xx_edma.c: Leverage eDMA logic from i.MXRT to S32K1XX. Appears to be the same IP but with fewer channels and features than the i.MXRT implementation. 2019-08-17 16:44:13 -06:00
Gregory Nutt
be55a6542f Squashed commit of the following:
arch/arm/src/s32k1xx/:  Add logic to look up the peripheral clock frequency.  Fix baud calcuation logic in s32k1xx_lowputc.c:  In no longer tries to enable clocking.  That must be done with board logic.  Now gets the peripheral functional clock frequency to determine the baud rate.

    arch/arm/src/s32k1xx:  Add peripheral feature arrays.
2019-08-17 14:36:40 -06:00
Gregory Nutt
e7a3231d7a Squashed commit of the following:
Finishes peripheral clock initialization:

      arch/arm/src/s32k1xx/s32k11x/s32k11x_clockmapping.c
      arch/arm/src/s32k1xx/s32k14x/s32k14x_clockmapping.c
        Provide MCU-specific mapping of clock names to PCC control registers.

      boards/arm/s32k1xx/s32k118evb/src/s32k118_periphclocks.c
        Provides initial clocking for for the S32K118EVB

    arch/arm/src/s32k1xx/s32k1xx_periphclocks.c:  Add logic to initialize peripheral clocking.

    arch/arm/src/s32k1xx/s32k1xx_clockconfig.c:  Add SIM clock configuration.
2019-08-17 11:50:32 -06:00
Gregory Nutt
1f021add53 arm/arm/src/stm32f7 and h7: Fix coding standard problems found by tools/nxstyle in files modified/added in last PR. 2019-08-17 08:20:31 -06:00
David Sidrane
1bbf5c9449 Merged in david_s5/nuttx/master_h7 (pull request #1002)
stm32h7 RTC and friends  support

* stm32h7:Removed f7 in file path

* stm32f7:Fix overwritten IRQ enabled

       System boot order calls clock_initialize then up_initalize.
       clock_initialize was setting up the alarm IRQ
       up_initalize is initializing the NVIC.

       This most likely worked in the past due to a bug in the
       NVIC init code that failed to clear the Interrupt enables.
       That was fixed in 510b0f7e arch/arm/src: Correct all ARMv7-M
       architectures.  Interrupts were not be disabled correctly
       on power up.

* stm32h7:Ported over F7 RTC

* nucleo-h743zi:Add RTC

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-17 14:01:28 +00:00
Gregory Nutt
f32c72f0e5 arch/arm/src/s32k1xx/hardware/s32k1xx_pmc.h: Add PMC register definition header file. 2019-08-16 17:36:27 -06:00
Gregory Nutt
5b102ff848 Squashed commit of the following:
arch/arm/src/s32k1xx/s32k1xx_clockconfig.c:  Finishes the implementation of the core clock configuration logic.
    arch/arm/src/s32k1xx/hardware/s32k1xx_smc.h:  Add SMC register definition header file.
    arch/arm/src/s32k1xx:  Bring in GPIO logic from Kinetis.  Looks like the same IP.
2019-08-16 16:18:15 -06:00
Nathan Hartman
223722d6d3 arch/arm/src/tiva: Modify preprocessor logic to support configs with no UART. Now similar to logic for other archs, such as arch/arm/src/a1x/a1x_lowputc.c and arch/arm/src/am335x/am335x_lowputc.c. This change eliminates compiler errors and warnings that were breaking the build with "No CONFIG_UARTn_SERIAL_CONSOLE Setting" when no UARTs / console were configured. 2019-08-15 18:16:24 -06:00
Gregory Nutt
a584865b47 arch/arm/src/s32k1xx/s32k1xx_clockconfig.c: First feeble fragments of clock configuration logic. 2019-08-15 18:08:35 -06:00
Gregory Nutt
74d76786de arch/arm/src/s32k1xx/Kconfig: Break out some feature configurations instead of relying os MCU selections for conditional logic. 2019-08-15 17:17:38 -06:00
Nathan Hartman
b7f1c21b36 arch/arm/src/tiva/common/tiva_irq.c: Add handling for IRQs 128 thru 159. Handling was missing for these IRQs, resulting in compiler warning(s) for 'Missing logic' and/or 'Missing output.' 2019-08-15 16:59:35 -06:00
Gregory Nutt
b0b33584ff boards/arm/s32k1xx/s32k118evb/src/s32k118_clockconfig.c: Add clock configuration data for the S32K118EVB. 2019-08-15 16:56:57 -06:00
Beat Küng
ef233507db Merged in bkueng/nuttx/serial_single-wire_pullup (pull request #994)
serial single-wire: add possibility to specify pull-up instead of open drain

Approved-by: David Sidrane <david.sidrane@nscdg.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-15 21:58:52 +00:00
Nathan Hartman
5a2d5fb7f9 arch/arm/src/tiva, arch/arm/include: Add support for Tiva TM4C123AH6PM. 2019-08-15 14:17:24 -06:00
Gregory Nutt
a276942f59 Fix minor typos in comments 2019-08-15 14:06:11 -06:00
Gregory Nutt
fba40c40f1 arch/arm/src/s32k1xx/s32k1xx_clockconfig.h: Add data structures that will eventually be used to configure clocking. 2019-08-15 14:03:02 -06:00
Gregory Nutt
eb4fff5221 Minor updates from review of last PR. 2019-08-15 10:05:21 -06:00
David Sidrane
77c3a06fea Merged in david_s5/nuttx/master_h7 (pull request #995)
Master h7

* stm327f:Kconfig add depends on BBSRAM

* stm32h7:memorymap fix BBSRAM name

* stm32h7:Add BBSRAM support

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-15 15:42:48 +00:00
Gregory Nutt
17a4efe031 boards/arm/s32k1xx/s32k118evb: More build fixes. 2019-08-14 13:31:21 -06:00
Gregory Nutt
963031f42c arch/arm/src/s32k1xx: A few fixes. The build progresses further but still fails. 2019-08-14 12:40:51 -06:00
Pavel Pisa
50a333f55c arch/arm/src/lpc17xx_40xx/Make.defs: Cortex-M system reset is applicable to LPC17_40 too. 2019-08-14 11:03:52 -06:00
Pavel Pisa
810bf5e87a symtab/Makefile: When system wide locale is set (i.e. en_US.UTF-8) then 'read' is ordered after 'readdir' even if separator is set to quotation mark and key set to 2. When C locale is used result is correct. 2019-08-14 11:02:30 -06:00
Gregory Nutt
2a228e8650 Fleshs out a few more things needed to compile and build the S32K118EVB board configuration.
Squashed commit of the following:

    arch/arm/include:  Add interrupt IRQ numbers.
    tools/: Add support for the S32K1XX family.
2019-08-14 10:57:54 -06:00
Gregory Nutt
36d21a7a5b Clean up a some missed re-naming in the last slash and burn s32k1xx commit. 2019-08-13 19:14:50 -06:00
Gregory Nutt
e3468c8aad arch/arm/src/s32k1xx: Bring in Cortex-M0+ Systick and interrupt handling from samd2l2; bring in Cortex-M4F Systick and interrupt handling from LPC54xx. 2019-08-13 19:10:38 -06:00
Gregory Nutt
7be79b661c arch/arm/src/s32k1xx: Fix some sub-directory names. 2019-08-13 18:50:54 -06:00
Pavel Pisa
913de5e216 arch/arm/src/lpc17xx_40xx/lpc17_40_can.c: f BOARD_CCLKSEL_DIVIDER is not equal to 1 on LPC178x or LPC40xx then base clock rate is calculated incorrectly because CCLK frequency does not correspond to PLL0 clock which is used for PCLK. This is partially workaround solution. It would be probably better to define BOARD_PCLK_FREQUENCY even for LPC176x targets and use that to replace divisor by base_clock in up_dev_s. 2019-08-13 16:16:49 -06:00
Gregory Nutt
8405f6510c arch/arm/src/s32k1xx: Bring in the lpuart from i.MXRT. It is the same IP. 2019-08-13 15:00:41 -06:00
Gregory Nutt
cd49e6fbd7 arch/arm/src/imxrt: Fix some errors in the LPUART register defintion files. Correct naming of a function: up_earlyserialinit() should be imxrt_earlyserialinit(). Remove prototypes for non-existent serial initialization functions. 2019-08-13 14:59:59 -06:00
Gregory Nutt
ce90390146 arch/arm/src/s32k1xx/hardware/s32k1xx_rcm.h: Add RCM register definition file. 2019-08-13 12:45:15 -06:00
Gregory Nutt
a1db129027 arch/arm/src/s32k1xx/hardware/s32k1xx_crc.h: Add CRC register definition file. 2019-08-13 11:24:46 -06:00
Gregory Nutt
d9a3f2ac0e arch/arm/src/s32k1xx/hardware/s32k1xx_wdog.h and s32k1xx_ewm.h: Add WDOG and EWM register definition file. 2019-08-13 11:05:08 -06:00
Gregory Nutt
b6c72debcb arch/arm/src/s32k1xx/hardware/s32k1xx_dmamux.h: Add DMAMUX register definition file. 2019-08-13 10:23:07 -06:00
Gregory Nutt
248a2966c6 arch/arm/src/s32k1xx/hardware/s32k1xx_gpio.h: Add GPIO register definition file. 2019-08-13 10:06:13 -06:00
Gregory Nutt
3f7b908674 arch/arm/src/s32k1xx/hardware/s32k1xx_port.h: Add PORT register definition file. 2019-08-13 08:46:41 -06:00
Gregory Nutt
387bd5d070 arch/arm/src/s32k1xx/hardware/s32k1xx_sim.h: Add SIM register definition file. 2019-08-12 18:12:21 -06:00
Gregory Nutt
bcfabcbe53 This commit brings the initial files for a port to the NXP S32K1xx family. This is very much a work in progress and is little more that a partial configuration/build environment and some S32K1xx register definition header files
Squashed commit of the following:

    arch/arm/src/s32k1xx/hardware/s32k1xx_mcm.h:  Add MCM register definition file.
    arch/arm/src/s32k1xx/hardware/s32k1xx_memorymap.h:  Add memory map definition file.
    arch/arm/src/s32k1xx/hardware/s32k1xx_cmu.h:  Add CMU register definition file.
    arch/arm/src/s32k1xx/hardware/s32k1xx_pcc.h:  Add PCC register definition file.
    arch/arm/src/s32k1xx/hardware/s32k1xx_scg.h:  Add SCG register definition file.
    arch/arm/src/s32k1xx:  Add initial Make.defs files.
    Basic configuration logic for the S32K1 family.
2019-08-12 12:12:58 -06:00
Anthony Merlino
e649d6c21e Merged in antmerlino/nuttx/stm32f7_progmem (pull request #989)
arch/arm/src/stm32f7: Exposes stm32_flash_xxx functions.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:36:46 +00:00
raiden00pl
5ed743d58a Merged in raiden00/nuttx_f334 (pull request #974)
Master

* Revert "Merged in yanqil-br/feature-multi_chan_pwm (pull request #973)"

    This reverts commit aef0e0b538.

* arch/arm/src/{stm32/stm32f7/stm32h7/stm32l4}/stm32_pwm.c: configure multi-channel duty only if channel specified. This allows you to update duty cycle for a single channel

* nucleo-f303re/configs: add basic NSH configuration

* nucleo-f303re/configs/pwm: enable console on UART2 and set entry point to nsh_main

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 15:14:19 +00:00
Gregory Nutt
0ed1a06016 arch/arm/include/cxd56xx/chip.h: The correction of commit c300f27130 must be applied to the CXD56xx too. 2019-08-10 08:33:47 -06:00
Yan Li
aef0e0b538 Merged in yanqil-br/feature-multi_chan_pwm (pull request #973)
multi-channel PWM with single chan selection

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-09 23:57:31 +00:00
Nathan Hartman
60f777b8f4 Fix various typos in documentation and comments. 2019-08-09 14:35:07 -06:00
Anthony Merlino
7eaa47072f Merged in antmerlino/nuttx/stm32f7-usart1-dma (pull request #972)
stm32f7: USART1_RXDMA is dependent on STM32F7_DMA2 not STM32F7_DMA1

Approved-by: David Sidrane <david.sidrane@nscdg.com>
Approved-by: Alan Carvalho de Assis <acassis@gmail.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-09 18:24:13 +00:00
Nathan Hartman
b417ed4b40 Tiva GPTM timers: Implement 16-bit PWM mode
arch/arm/src/tiva/Kconfig:
    Remove EXPERIMENTAL dependency on TIVA_TIMER16_PWM.

arch/arm/src/tiva/common/tiva_timerlib.c:
    Fix wrong 32/16-bit ifdef checks.
    Add tiva_pwm16_sel_event() to choose GPTMCTL.TnEVENT value.
    Implement tiva_pwm_mode16().
    tiva_timer16_setinterval(): Fix wrong check for TIMER16_MODE_ONESHOT
        and TIMER16_MODE_PERIODIC. Was comparing to config->cmn.mode
        which can never have those values. This prevented interrupts being
        enabled. Compare to timer->mode instead.
    Add tiva_timer16pwm_setperiodduty() to set initial period, duty cycle,
        and enable interrupts if requested in GPTM peripheral. Interrupts
        are not enabled in NVIC until tiva_timer16_start() is called.
    Add tiva_timer16pwm_setduty() to update duty cycle at any time.

arch/arm/src/tiva/hardware/lm/lm3s_timer.h,
arch/arm/src/tiva/hardware/lm/lm4f_timer.h,
arch/arm/src/tiva/hardware/tm4c/tm4c123_timer.h,
arch/arm/src/tiva/hardware/tm4c/tm4c129_timer.h:
    Add missing defines; make surrounding defines consistent.

arch/arm/src/tiva/tiva_timer.h:
    Add new TIMER_FLAG_* configuration flags to enable configuring the
    16-bit PWM feature. Extend type of "flags" in tiva_timer32config_s
    and tiva_timer16config_s from 8- to 32-bits to allow more flags.
2019-08-09 11:03:44 -06:00
Gregory Nutt
545cfada38 This commit removes CONFIG_ARCH_INT_DISABLEALL. In the normal course of things, interrupts must occasionally be disabled using the up_irq_save() inline function to prevent contention in use of resources that may be shared between interrupt level and non-interrupt level logic. Now the question arises, if we are using BASEPRI to disable interrupts and have high priority interrupts enabled (CONFIG_ARCH_HIPRI_INTERRUPT=y), do we disable all interrupts except SVCall (we cannot disable SVCall interrupts). Or do we only disable the "normal" interrupts?
If we are using the BASEPRI register to disable interrupts, then the answer is that we must disable ONLY the "normal interrupts".  That is because we cannot disable SVCALL interrupts and we cannot permit SVCAll interrupts running at a higher priority than the high priority interrupts (otherwise, they will introduce jitter in the high priority interrupt response time.)

Hence, if you need to disable the high priority interrupt, you will have to disable the interrupt either at the peripheral that generates the interrupt or at the NVIC.  Disabling global interrupts via the BASEPRI register cannot effect high priority interrupts.
2019-08-09 10:52:35 -06:00
Gregory Nutt
c300f27130 arch/arm/include/armv7-m/nvicpri.h: In the 'normal' case, the priority of the SVCALL interrupt was the same as the priority of the high priority interrupt. This means that SVCALL interrupt processing can defer the high priority interrupt and result in the jitter in that interrupt response. Fix is to raise the priority of the high priority interrupt above the priority of the SVCALL interrupt. Suggested by Nathan Hartman. 2019-08-09 07:07:16 -06:00
David Sidrane
786d3453a2 Merged in david_s5/nuttx/master_f7_eth (pull request #970)
stm32f7:ethernet add timeout on MAC reset

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-08 16:17:57 +00:00
Gregory Nutt
2730714774 Update more comments and README.txt files to reflect new organization of the boards/ sub-directory. 2019-08-08 09:17:04 -06:00
Gregory Nutt
240926c995 Beginning to update comments to reflect new organization of the boards/ sub-directory. 2019-08-08 08:46:54 -06:00
Gregory Nutt
eaaa73198b boards/Board.mk: Correct a simulator included path problem introduced by reorganization of arch/sim/src. 2019-08-08 07:17:43 -06:00
Nathan Hartman
2f0a3b6d75 arch/arm/src/tiva/common/tiva_timerlib.c: Fix one code error and some comment errors. tiva_timer16_setinterval(): Was DEBUGASSERTing on mode != TIMER16_MODE. Fixed to DEBUGASSERT on mode == TIMER16_MODE. 2019-08-07 18:58:45 -06:00
Gregory Nutt
c840ac2496 arch/sim: Even though the simulation has no chips, it needs to have CONFIG_ARCH_CHIP and chip sub-directories. Otherwise, we would have to treat it as a special case in the build system. 2019-08-07 16:05:00 -06:00
Augusto Fraga Giachero
a1f1adb878 arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c: Fix the initialization for DP83848x PHYs. The DP83848x requires the RMII mode to be manually enabled through the MII_DP83848C_RBR register. Before querying the speed and mode it should wait for the link to be established. 2019-08-07 09:22:50 -06:00
Augusto Fraga Giachero
41d3ef5f1b arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c: Follow the procedure listed in the LPC176x/5x User Manual when reading from and writing to the PHY's registers (section 10.11.14). I couldn't see any behavioral change after this commit, but nonetheless is a good practice to follow the manufacturer's recommended procedure. 2019-08-07 09:01:10 -06:00
Augusto Fraga Giachero
17518b4a7d arch/arm/src/lpc17xx_40xx/Kconfig: Add missing LPC17_40_PHY_CEMENT_DISABLE config to the lpc17xx Kconfig file. For some reason this config wasn't referenced anywhere else except in arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c. 2019-08-07 08:59:38 -06:00
Nathan Hartman
06f693965c Tiva: Fix errors in low-level timer support
arch/arm/src/tiva/common/tiva_timerlib.c:
* tiva_gptm_configure() and tiva_gptm_release(): Fix error: Was calling
  tiva_emac_periphrdy() instead of tiva_gptm_periphrdy().

arch/arm/src/tiva/tiva_timer.h:
* Fix error in "abcde" description of bit flag defines.
2019-08-07 07:35:37 -06:00
Nathan Hartman
162e2e1c65 arch/arm/src/tiva/common/tiva_timerlib.c: Fix minor errors in tiva_timerlib
Fix incorrect preprocessor conditionals related to Kconfig defines:
* CONFIG_TIVA_TIMER32_EDGECOUNT -> CONFIG_TIVA_TIMER16_EDGECOUNT
* CONFIG_TIVA_TIMER32_TIMECAP -> CONFIG_TIVA_TIMER16_TIMECAP
* CONFIG_TIVA_TIMER32_PWM -> CONFIG_TIVA_TIMER16_PWM
2019-08-06 17:09:42 -06:00
David S. Alessio
ced0dc1e16 arch/arm/src/armv7-m: Add ARMv7-M setjmp/longjump functions. 2019-08-06 15:59:19 -06:00
Markus Bernet
f1462d2a2f arch/arm/src/stm32h7: Fix UART7/8 typos. Fix bug in ETH_MACQTXFCR configuration. 2019-08-06 07:37:55 -06:00
David Sidrane
1881a7216e Merged in david_s5/nuttx/master_kinetis_i2c_fix_txfer (pull request #965)
kinetis:i2c transfer ensure correct result returned

kinetis_i2c_transfer released the mutex then fetched
   the state, this resulted in returning the correct
   results.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-05 20:31:34 +00:00
Gregory Nutt
615c0ea7ee Change naming configs/ to boards in comments, Documentation, etc. Still a few more to go. 2019-08-05 07:13:48 -06:00
Alin Jerpelea
a1c991d921 Merged in alinjerpelea/nuttx (pull request #963)
Move boards to boards folder

* boards: rename configs folder to boards

    This is the proposed layout after the change:

    boards: - folder containing board folders
            <board>: - name of each board
                    drivers: - extra drivers specific for platform
                    include: - header files for the boars
                    scripts: - extra scripts specific for platform
                        src: - board specific code
                      tools: - extra tools specific for platform
                    <config>: - board specific configuration(s)

    Note:
    <xxx> names are dependent on platform

    This is a logical change to aim to the arch layout but this is a
    huge change it should be done in several steps to lower the risk.

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

* Kconfig: replace configs with boards

    The change is needed after the path change

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

* Makefile: replace configs with boards

    The change is needed after the path change

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

* Makefile.*: replace configs with boards

    The change is needed after the path change

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

* Make.defs: replace configs with boards

    The change is needed after the path change

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

* .sh: replace configs with boards

    The change is needed after the path change

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

* .mk: replace configs with boards

    The change is needed after the path change

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

* .c & .h: replace configs with boards

    The change is needed after the path change

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

* .bat: replace configs with boards

    The change is needed after the path change

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-05 12:04:14 +00:00
Nathan Hartman
5f76eb1207 arch/arm/src/tiva: LM3S, LM4F, TM4C: Fix GPIO IRQ error, ports R, S, T. Preprocessor logic for CONFIG_TIVA_GPIOx_IRQS was setting/clearing port Q defines when it should act on ports R, S, T. gpioport2irq() was missing handling for port T. 2019-08-04 16:55:26 -06:00
Nathan Hartman
68d43d3679 Fix typos. 2019-08-04 14:50:28 -06:00
Kejun ZHOU
19b81899de Merged in zhoukejun/nuttx-rv32-vega-lite (pull request #962)
Rename the arch/risc-v/src/gap8/gap.h to arch/risc-v/src/gap8/gap8.h

Signed-off-by: zhoukejun <zhoukejun@outlook.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-04 13:25:07 +00:00
Nathan Hartman
a36d49e975 arch/arm/src/tiva, include/nuttx/sensors: Reinstate TM4C qencoder driver and expand its ioctls.
arch/arm/src/tiva/Kconfig:
* Add TIVA_HAVE_QEI0, TIVA_HAVE_QEI1 as applicable to each ARCH_CHIP_TM4C12*.
* Add config TIVA_QEI, TIVA_HAVE_QEI0, TIVA_HAVE_QEI1.
* Add config TIVA_QEI0, config TIVA_QEI1.

arch/arm/src/tiva/common/tiva_qencoder.c:
* Rewrite tiva_qe_setup().
* Replace tiva_qe_ppr() with tiva_qe_resetatppr().
* Add tiva_qe_resetatmaxpos(), tiva_qe_resetatindex().

arch/arm/src/tiva/hardware/tiva_qencoder.h:
* Add missing definitions: SIGMODE_QUADRATURE, SIGMODE_CLK_AND_DIR, SWAP_NO_SWAP, SWAP_PHA_PHB.

arch/arm/src/tiva/tiva_qencoder.h:
* Rename TIVA QEI ioctl QEIOC_PPR to QEIOC_RESETATPPR.
* Add TIVA QEI ioctl identifiers QEIOC_RESETATMAXPOS, QEIOC_RESETATINDEX.

include/nuttx/sensors/qencoder.h:
* Increase QE_TIVA_NCMDS from 3 to 5.
2019-08-02 15:56:05 -06:00
Markus Bernet
e7fdbd8c81 arch/arm/src/stm32h7/:
STM32H7 RCC:  Fix RCC register definitions and typos in ADC/UART
STM32H7 ADC:  Fix internal channel numbers
STM32H7 UART:  Fix typo in UART8 configuration
2019-08-02 07:09:52 -06:00
David Sidrane
2204b6506b Merged in david_s5/nuttx/master_stm_hw_hs (pull request #961)
stm32{L4|F4|H7}:serial add HW HS on UART 4 & 5

* stm32:serial add HW HS on UART 4 & 5

* stm32f7:serial update copyright date

* stm32h7:serial add HW HS on UART 4 & 5

* stm32l4:serial add HW HS on UART 4 & 5

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-01 19:52:43 +00:00
David Sidrane
7712d15867 Merged in david_s5/nuttx/master_f7_uart4_5_hw_hs (pull request #960)
stm32f7:serial add HW HS on UART 4 & 5

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-01 00:16:29 +00:00
Nathan Hartman
32e9ba7604 Documenation/, configs/: ix typos and one HTML syntax error. Fix HTML syntax error in Documentation/NfsHowto.html: <coce> -> <code> html tag. 2019-07-30 16:10:15 -06:00
Gregory Nutt
eef2f4599e Commit 933e9e407b broke the simulator on a 64-bit platform. 2019-07-29 14:34:29 -06:00
Nathan Hartman
c71f2fa56f arch/arm/src/tiva: Rename TM4C1294NC identifiers to TM4C1294NCPDT.
Rationale: TM4C1294NC is ambiguous:

  TM4C1294NCPDT is a 128-TQFP
  TM4C1294NCZAD is a 212-NFBGA

The TM4C1294NC part currently supported by NuttX is the TM4C1294NCPDT used on the TI EK-TM4C1294XL "Connected LaunchPad" (see configs/tm4c1294-launchpad). To ensure the correct part is fully specified, this commit updates all TM4C1294NC identifiers to TM4C1294NCPDT.

Rename:

  CONFIG_ARCH_CHIP_TM4C1294NC to CONFIG_ARCH_CHIP_TM4C1294NCPDT
  ARCH_CHIP_TM4C1294NC to ARCH_CHIP_TM4C1294NCPDT
  TM4C1294NC to TM4C1294NCPDT
2019-07-29 13:31:52 -06:00
Gregory Nutt
97265f3ca3 arch/arm/src/lpc17xx_40xx/lpc17_40_adc.c: Fix very minor coding standard problem in last PR. 2019-07-29 12:05:47 -06:00
jjlange
bc38e98862 Merged in jjlange/nuttx (pull request #957)
Only use PCLKSEL0 for ADC on LPC176x family.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-29 18:03:27 +00:00
Nathan Hartman
6e8b76c3ab arch/arm/src/tiva: Rename TM4C123GH6PMI identifiers to TM4C123GH6PM
Rationale: In terms of firmware programming, there is no functional difference between these parts:

  TM4C123GH6PMI7
  TM4C123GH6PMI7R
  TM4C123GH6PMT7
  TM4C123GH6PMT7R

From a programming standpoint, all of the above parts are TM4C123GH6PM, which means it doesn't make sense to differentiate between PM and PMI. (The PM means 64-LQFP. The I means temperature range -40C to +85C. It could be T meaning -40C to +105C. The R means it ships in Tape and Reel packaging as opposed to Tray.)

arch/arm/include/tiva/chip.h:
arch/arm/include/tiva/tm4c_irq.h:
arch/arm/src/tiva/hardware/lm/lm3s_flash.h:
arch/arm/src/tiva/hardware/tm4c/tm4c_pinmap.h:
configs/tm4c123g-launchpad/README.txt:
configs/tm4c123g-launchpad/nsh/defconfig:
  Rename: CONFIG_ARCH_CHIP_TM4C123GH6PMI to CONFIG_ARCH_CHIP_TM4C123GH6PM

arch/arm/src/tiva/Kconfig:
configs/Kconfig:
  Rename: ARCH_CHIP_TM4C123GH6PMI to ARCH_CHIP_TM4C123GH6PM

arch/arm/src/tiva/hardware/tm4c/tm4c_memorymap.h:
  Rename: CONFIG_ARCH_CHIP_TM4C123GH6PMI to CONFIG_ARCH_CHIP_TM4C123GH6PM
  Remove redundant Peripheral Base Addresses section. There were two identical copies, one for CONFIG_ARCH_CHIP_TM4C123GH6PMI and another for CONFIG_ARCH_CHIP_TM4C123GH6PM.
2019-07-29 11:15:46 -06:00
Gregory Nutt
e0f1469526 Fix warnings found in build testing. 2019-07-28 17:50:57 -06:00
Gregory Nutt
55ec857f6f arch/arm/src/imxrt/imxrt_usdhc.c: Trivial coding standard fix 2019-07-28 16:54:31 -06:00
Gregory Nutt
1af4d6a905 Merge branch 'master' of bitbucket.org:nuttx/nuttx 2019-07-28 16:53:53 -06:00
Gregory Nutt
a54d660842 configs/stm32f769i-disco/src/stm32_bringup.c: Fix more errors found in build testing. 2019-07-28 16:52:55 -06:00
Dave Marples
986a9160b9 arch/arm/src/imxrt/imxrt_clockconfig.c: Enable TRACE clocks if the divider has been defined in the board's board.h file. 2019-07-28 16:28:06 -06:00
Dave Marples
970295d0fe i.MXRT USDHC: This change completes SDIO support for IMXRT, and also adds support for WiFi using the AP6212A module based on Simon Piriou's rather excellent work. The patch should also address DavidS's concern about width setting for USDHC1 & 2.
Testing of the WiFi is minimal so far but functionality is proven. I'm specifically not happy that the driver doesn't recover elegantly from a DMA data checksum failure, but that is an issue that can be dealt with in due course ... I'm trying to get the rest of the interfaces fleshed out and the hardware proven so it can go for pre-production build. I _think_ there's only Bluetooth and USB-device left to implement now.
2019-07-28 16:20:33 -06:00
Augusto Fraga Giachero
e0bd90d8a3 arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c: Set speed back to 10Mbps if 10Mmbps link negotiated. 2019-07-27 12:16:13 -06:00
Daniel P. Carvalho
23d5e666cc onfigs/nucleo-l432kc: ADC: Change analog pins definitions and correct DMA related issue. 2019-07-27 07:42:50 -06:00
Simon Piriou
780d4d41e8 drivers/mtd/mx25rxx.c: add support for 512B sectors
- Fix for mx25rxx driver as it does not work properly
- Add mx25rxx memory chip & smartfs support in b-l475e-iot01a/nsh config
- Update smartfs smart_scan() function
2019-07-26 09:19:26 -06:00
David Sidrane
08460ba5b1 Merged in david_s5/nuttx/master_f7 (pull request #956)
stm32f7:If only one SDMMC it is slot 0

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-26 14:16:26 +00:00
Augusto Fraga Giachero
f0b74380a5 arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c: Calculate the appropriate timeout for I2C transfers. Depending on the bus frequency and transfer size, I2C transactions can take quite a bit, so a fixed timeout is not a good solution. Calculating the timeout at run time poses some overhead but still better than aborting long transactions. 2019-07-25 13:07:28 -06:00
Augusto Fraga Giachero
38b9862902 arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c: Abort I2C transfers if a timeout has occurred. If a timeout has occurred in the middle of a I2C transfer, the next I2C interrupt should abort any transfers and send a stop condition to the corresponding I2C bus. Failed to do so will result in memory corruption / undefined behavior as priv->msgs points to a region of memory it doesn't owns anymore after lpc17_40_i2c_start returns. 2019-07-25 08:33:31 -06:00
Nicholas Chin
f5ff35ad9c arch/arm/src/imxrt/imxrt_lpi2c.c: Slave addresses are now correctly shifted when sending start. TX/RX FIFOs now discarded on error to prevent FIFO underflow errors. Fixes error checking to use priv structure and removes checking of BBF flag as it is not an error. 2019-07-23 09:08:15 -06:00
Anthony Merlino
96f019a822 Merged in antmerlino/nuttx/stm32f7_otghs (pull request #951)
stm32f7: Fixes bad preprocessor logic preventing USB OTG HS to work when used without external ULPI.

Approved-by: David Sidrane <david.sidrane@nscdg.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-22 17:47:37 +00:00
Ouss4
2d6e4bd26b arch/mips/src/pic32mz/pic32mz-config.h: Make the PLL input clock configurable. 2019-07-21 16:11:04 -06:00
Ouss4
99111c2af8 drivers/mtd/sst26.c: Accept the 16MBit Flash when reading the JEDEC-ID at init. 2019-07-21 16:07:44 -06:00
Ouss4
145970a266 arch/mips/src/pic32mz/pic32mz-spi.c: Fix SPI Mode selection. CKE is the inversion of the CPHA. 2019-07-21 15:57:06 -06:00
Bernd Walter
1812d6f515 arch/arm/src/sam34/Kconfig: Add missing DMA configuration setting. 2019-07-21 14:56:14 -06:00
Pierre-Olivier Vauboin
994e52c7c8 arch/arm/src/stm32h7/stm32_ethernet.c: Fix typo in define. 2019-07-16 19:12:10 +02:00
David Sidrane
4da872f059 Merged in david_s5/nuttx/master_rt_fix (pull request #949)
imxrt:Fix compiler error for CONFIG_IMXRT_USDHC1 && !CONFIG_IMXRT_USDHC2

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-13 16:53:57 +00:00
Gregory Nutt
a9b84eb941 arch/arm/src/stm32/Kconfig: Revert duplicate dependency introduced by 9f6361060d 2019-07-13 10:21:42 -06:00
Gregory Nutt
9f6361060d arch/arm/src/stm32/Kconfig: Segment LCD source clock selection should debug on CONFIG_STM32_LCD. 2019-07-13 10:07:02 -06:00
Alan Carvalho de Assis
b10df23454 arch/arm/src/stm32/Kconfig: Add the missing STM32 LCD Clock Source Selections. 2019-07-13 09:54:57 -06:00
Alin Jerpelea
5867fdc0e1 Merged in alinjerpelea/nuttx (pull request #948)
arch: arm: cxd56xx: add GNSS device and UART0

* arch: arm: cxd56xx: add GNSS device

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

* arch: arm: cxd56xx: add Geofence Support

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

* arch: arm: cxd56xx: add UART0 iterface

    UART0 is an interface with hardware flow control in the application subsystem.

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

* configs: spresense: path correction

    In the initial commit the path reference was not updated

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-12 11:29:22 +00:00
Gregory Nutt
ad1adffba6 arch/arm/src/lpc11xx, arch/arm/include/lpc11xx, configs/lpcxpresso-lpc1115: Support for the LPCXpresso-LPC1115 and for the LPC1115 architecture in general was removed after NuttX-7.30. The LPC11 port was never really used (to my knowledge) and was no longer supported. A snapshot of the port is still available in the Obsoleted repository. It can be brought back into the main repository at any time if anyone is willing to provide support for the architecture. 2019-07-11 16:16:11 -06:00
Gregory Nutt
23df4a25d2 configs/lpc4088-quickstart: Remove crap configurations that do not build. 2019-07-11 12:33:32 -06:00
Gregory Nutt
7221311578 arch/arm/src/lpc11xx: Fix a few of the easy copy-paste naming problems. 2019-07-11 11:47:30 -06:00
Gregory Nutt
021a32b97d Fix some issues revealed by name changin of commit e5dfd805e6. 2019-07-11 11:19:03 -06:00
jjlange
e5dfd805e6 Merged in jjlange/nuttx/lpc40xx (pull request #946)
Add support for LPC40xx family chips

* Corrected a few peripheral definitions and pin functions for the LPC17xx family.
    Added configuration options, chip definitions, and additional pin functions for the LPC40xx family.
    Added board configurations for Embedded Artists LPC4088 Quickstart board and LPC4088 Developer's kit.  These configurations are still something of a work in progress.  In particular, the LCD functionality is untested.

* First pass rename in *.c and *.h files.

* Renamed LPC17XX to LPC17XX_40XX in config files

* Rplaced LPC17xx with LPC17xx/LPC40xx in .c files

* Replaced LPC17xx with LPC17xx/LPC40xx in .h files

* Updated some documentation

* Working on moving directories

* moved arch/arm/src/lpc17xx and arch/arm/include/lpc17xx to lpc17xx_40xx

* Renamed LPC17_* constants / configuration options to LPC17_40_*

* Updated chip family name defines

* Renamed some chip-specific files

* Updated references to renamed files

* Updated references to lpc17_ to lpc17_40_

* Renamed source files from lpc17_* to lpc17_40_*

* Clean up white space

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-11 16:50:00 +00:00
Gregory Nutt
61d7fb5e41 video/videomode/videomode_lookup.c: At some additional lookups from FreeBSD. Not currently used in NuttX so ifdef'ed out for now. 2019-07-10 17:26:07 -06:00
Gregory Nutt
2811a297c7 Squashed commit of the following:
drivers/lcd/tda19988.c:  Now uses the new common videomode structure of include/nuttx/video/videomode.h as do other video components.

    video/, include/nuttx/video/videomode.h:  Separate EDID and from videomode managment.  They really are separate things.
2019-07-10 09:00:17 -06:00
Gregory Nutt
07b839965b arch/arm/src/am335x/Kconfig: Remove unused configuration settings left over from original copy-paste. 2019-07-09 19:11:50 -06:00
Petro Karashchenko
c9ff188f3e arch/arm/src/am335x: Changes related to Control Module 2019-07-09 15:38:38 -06:00
Petro Karashchenko
eed706d458 arch/arm/src/am335x/hardware/am335x_prcm.h: Rename am335x_cm.h to am335x_cm.h. 2019-07-09 14:50:07 -06:00
Gregory Nutt
8be74cdc48 configs/beaglebone-black/src/am335x_lcd.c: Can't use TDA19988 yet because there is no I2C driver. In the mean time, support LCD initialization using a fixed, configurable video mode. 2019-07-09 13:43:04 -06:00
Gregory Nutt
5c50854091 configs/beaglebone-black/src/am335x_lcd.c: Framework (only) for TDA19988 and LCD support for Beaglebone Black. 2019-07-09 10:21:38 -06:00
Michael Jung
d5ec2ab9bc On the LPC1769 there are two 16 KiB AHB SRAM blocks, which are mapped back to
back at physical address 0x2007C000 and 0x20080000 (i.e. right below and right
above a 512 KiB boundary).  Memory from those two blocks is considered
continuous when assigned to a heap.

In the protected build mode, when the memory protection unit is used, though,
it must be split into two MPU regions.  This is because MPU regions must be
naturally aligned, and the 32KiB continuous address space of the two 16KiB AHB
SRAM blocks does not start at an address divisible by 32KiB.

The only other configurations that use protected build mode on lpc17xx are
currently open1788/knsh and open1788/knxterm.  The LPC1788 has the AHB SRAM
blocks mapped more sanely (from an MPU region point of view), which is
probably why no problems emerged here.  Both still compile with my change and
other than wasting an MPU region (which would otherwise remain unused) should
work fine.  That said, I have no hardware to confirm.
2019-07-09 07:23:10 -06:00
Gregory Nutt
e5eee68d0d arch/arm/src/am335x/am335x_lcdc.c: LCDC driver is now code complete and ready for testing. 2019-07-08 15:41:32 -06:00
Gregory Nutt
6991ac37fe arch/arm/src/am335x/am335x_lcdc.c: Add logic to get/set the module reference clock. Still one more clocking interface to to. 2019-07-08 14:52:32 -06:00
Gregory Nutt
e16c73957d arch/arm/src/am335x/am335x_sysclk.c: Add a function to return a frequency of the system clock. 2019-07-08 14:08:26 -06:00
Gregory Nutt
ed91fa34a0 Squashed commit of the following:
arch/arm/src/am335x:  Add logic to map the framebuffer to a non-cached, non-buffered memory region.
    arch/arm/src/am335x:  Remove struct am335x_fbinfo_s.  Replaced with configuration settings that provide the same information.
2019-07-08 13:23:56 -06:00
Gregory Nutt
b58f598d31 This commit brings in an initial LCD driver sof the AM335x architecture. This is a work in progress and so depends on EXPERIMENTAL. The code is nearly compete, missing some clock configureation settings. It does compile properly.
Squashed commit of the following:

    arch/arm/src/am335x/am335x_lcdc.c:  LCD driver now compiles.
    arch/arm/src/am335x/am335x_lcd.c:  This brings the LCD driver to code complete.  Have not yet attempted to compile.
    arch/arm/src/am335x/am335x_edid.c:  Framebuffer is pre-allocated.  In verification of video mode, include a test to assure that the video mode can be supported by the pre-allocated framebuffer memory.
    arch/arm/src/am335x/am335x_lcd.c:  At a little bit of LCD initialization logic.  There is a long way to go.
    arch/arm/src/am335x/am335x_edid.c:  Add am335x_lcd_videomode() which provides an alternative way of initializing the LCD controller.
    arch/arm/src/am335x/am335x_edid.c:  edit.h has move to include/nuttx/video.
    arch/arm/src/am335x/hardware/am335x_cm.h:  Fix a typo in a macro name.
    arch/arm/src/am335x/am335x_edid.c:  Integrate video/edid support.
    arch/arm/src/am335x/am335x_edid.c:  Fall back to VGA mode is not valid videomode is availabe in the EDID data.
    arch/arm/src/am335x/am335x_edid.c:  Fixes for a partially clean compile.
    arch/arm/src/am335x/am335x_edid.c:  Add basic logic to convert EDID montor descriptions into a form usable for LCD configuration.
    arch/arm/src/am335x: Add framework (only) for an LCD driver.  Initial commit is simply the LPC54 framebuffer driver with naming changes.
2019-07-08 12:06:23 -06:00
Gregory Nutt
2b25d56bfd arch/arm/src/am335x/hardware/am335x_lcd.h: Fix a few typos. Add things needed by the LCDC driver. 2019-07-08 11:17:03 -06:00
Dave Marples
69e215e083 As promised, here's the patch that implements USDHC1 & 2 selection on the imxrt. If only one port is active (either 1 or 2) it will always be numbered as 0, if both are active then USDHC1 will be number 0, USDHC2 will be 1. 2019-07-07 17:07:04 -06:00
Gregory Nutt
a94970c0df arch/arm/src/am335x/hardware/am335x_cm.h: Fix a typo in a macro name. 2019-07-07 16:57:09 -06:00
Gregory Nutt
4cb8e6a0d7 Trivial, cosmetic fixes to spacing and spelling 2019-07-06 15:22:55 -06:00
Petro Karashchenko
bd248b52e4 arch/arm/src/am335x/hardware: Add register description files for MCSPI. 2019-07-06 12:24:11 -06:00
Petro Karashchenko
4af30628b6 arch/arm/src/am335x/hardware: Add register description files for I2C (plus various improvements to the WDOG register definitions) 2019-07-06 09:26:53 -06:00
Petro Karashchenko
90bed3383e arch/arm/src/am335x/hardware: Add register description files for DCAN and LCD. 2019-07-06 06:57:05 -06:00
Beat Küng
9878997f72 Merged in bkueng/nuttx/uart_invert_ioctl_kinetis (pull request #937)
kinetis: add uart signal inversion support

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-05 14:24:52 +00:00
Jonathan Richner
fc7d43dc55 arch/arm/src/stm32h7/stm32_spi.c: Correct a typo in condition compilation. 2019-07-05 08:14:18 -06:00
David Sidrane
a380a68680 Merged in david_s5/nuttx/master_rt_fix (pull request #936)
imxrt:USDHC Stopgap Fix for build breakage

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-04 16:41:50 +00:00
David Sidrane
b3a86e5ac6 Merged in david_s5/nuttx/master_rt_fix (pull request #933)
imxrt:Fix serial TIOCSINVERT

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-04 15:15:04 +00:00
Alin Jerpelea
9b8c4a355d Merged in alinjerpelea/nuttx (pull request #935)
drivers: video: add ISX012 Image sensor

* arch: arm: src: cxd56xx: add cisif support

    add cisif support on cxd56xx chip to be able to use cameras

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

* drivers: video: add ISX012 Image sensor

    add driver for ISX012 Image sensor

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-04 14:02:05 +00:00
Alin Jerpelea
37a24c05fd arch/arm/src/cxd56xx: Cleaning up header files to match project layout. 2019-07-04 06:45:48 -06:00
Masayuki Ishikawa
48760b2636 Merged in masayuki2009/nuttx.nuttx/improve_gs2200m_performance (pull request #931)
Improve gs2200m performance

* arch/arm/src/cxd56xx: Fix dma initialization in cxd56_dmac.c

    up_dma_initialize() must be used instead of up_dmainitialize()

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

* drivers/wireless: Introduce CONFIG_WL_GS2200M_SPI_FREQUENCY

    Also, changed usleep(100) to up_udelay(100) to avoid invalid response.

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

* configs/spresense/wifi: Improve performance for webserver

    This commit changes followings.

      1. Enable SPI DMA for both TX and RX
      2. Increase SPI clock speed from 4MHz to 10MHz
      3. Increase buffer size for sendfile() from 512B to 1KB
      4. Enable sendfile() for webserver

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-04 11:30:54 +00:00
Petro Karashchenko
55026f245b arch/arm/src/am335x: Add clock module registers definition. Switch to DMTIMER1 for systick. 2019-07-03 15:26:15 -06:00
Beat Küng
03fe07c540 Merged in bkueng/nuttx/uart_invert_ioctl_continued (pull request #930)
serial: add TIOCSINVERT and TIOCSSWAP ioctl's for stm32{l4,h7} and imxrt

* stm32l4 serial: add TIOCSINVERT and TIOCSSWAP ioctl's

* stm32l4 serial: ensure TIOCSSINGLEWIRE is atomic and UE disabled

* stm32h7 serial: add TIOCSINVERT and TIOCSSWAP ioctl's

* imxrt serial: add TIOCSINVERT ioctl

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-03 20:22:09 +00:00
Dave Marples
093f98c2bb arch/arm/src/imxrt/imxrt_usdhc.c: Implements SDIO and Multi-card support for i.MX RT. 2019-07-03 12:42:09 -06:00
Beat Küng
1395938260 arch/arm/src/stm32f7/stm32_serial.c: This adds the ability to invert and swap RX/TX on STM32F7 UARTs. I added the TIOCGINVERT as well to reserve the IOCTL number, but did not implement it. This is the same as for TIOCGSINGLEWIRE. 2019-07-03 09:23:18 -06:00
Alin Jerpelea
55a4029885 Merged in alinjerpelea/nuttx (pull request #928)
configs: spresense: add basic LCD configuration

* arch: arm: cxd56xx: add Graphics Engine

    Add driver for hardware image processor device

    to enable the hardware image processor set CXD56_GE2D=true

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

* drivers: lcd: add ILI9340 LCD Single Chip Driver

    LCD Single Chip Driver, ILI9340, ILI Technology Corp.

    Required LCD driver settings:
    LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be accepted.
    LCD_MAXPOWER should be 1:  0=off, 1=on

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

* drivers: lcd: JDI LPM013M091A LCD Driver

    JDI LPM013M091A LCD Driver.

    This driver doesn't support reading data.
    Recommended to use DMA to transfer data or displayed image would be
    broken.

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

* configs: spresense: add basic LCD configuration

    add basic LCD configuration for spresense board

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

* configs: spresense: add lpm013m091a LCD

    add device configuration for lpm013m091a LCD on spresense board

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

* configs: spresense: add ili9340 LCD

    add device configuration for ili9340 LCD on spresense board

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

* configs: spresense: add defconfig with LCD

    add defconfig with LCD for spresense board

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-03 12:24:13 +00:00
Masayuki Ishikawa
7815c3a720 Merged in masayuki2009/nuttx.nuttx/tiva_with_qemu (pull request #927)
arch/arm/src/tiva: Add a workaround for tiva with qemu

With qemu, tiva_ifup() hangs because ethernet link status can not
be set correctly. This PR is a workaround to avoid this issue.

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-03 00:28:15 +00:00
Gregory Nutt
5653b9a2af arch/arm/src/lpc17xx/lpc17_lowputc.c: Correct muffed warning fix of 35521ab2b6. 2019-06-30 06:56:24 -06:00
Dave Marples
923cb52c7a arch/arm/src/imxrt/imxrt_ehci.c: Add i.MXRT ECHI driver. 2019-06-29 18:39:42 -06:00
Gregory Nutt
35521ab2b6 Fix some new warnings found in build testing. 2019-06-29 13:24:38 -06:00
Gregory Nutt
3f9ef89e19 Various Kconfig files: Kconfig files should not select SCHED_WORKQUEUE since that is really only is only the logical OR if SCHED_LPWORK and SCHED_HPWORK. Selecting it has no effect other than to produce an erroneous configuration. 2019-06-29 10:10:43 -06:00
Abdelatif Guettouche
ee32b449a6 arch/mips/src/pic32mz: Add DMA support. 2019-06-28 10:03:18 -06:00
Ouss4
87499ba3ec arch/mips/src/pic32mz/pic32mz-gpio.c: Use LAT instead of PORT when writing. 2019-06-28 09:51:19 -06:00
Jukka Laitinen
bbd4b22929 arch/arm/src/stm32h7/hardware/stm32_ethernet.h: Correct ETH_MACMDIOAR. Correct the physical layer address bits in ETH_MACMDIOAR register. 2019-06-28 08:24:59 -06:00
Eduard Niesner
056eebd9da arch/arm/src/stm32h7: Ported the QEncoder from F7 to H7. 2019-06-27 07:07:55 -06:00
Alin Jerpelea
b922c2748e Merged in alinjerpelea/nuttx (pull request #920)
arch: src: cxd56xx: add EMMC suport

add EMMC suport for cxd56xx chip

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-27 12:08:18 +00:00
Bernd Walter
2f9a76b21c arch/arm/src/samd2l2/hardware/samd_tc.h: Correct register bit field definitions used with TC_CTRLBCLR and TC_CTRLSET registers. 2019-06-26 13:20:39 -06:00
Gregory Nutt
a73cd667d9 configs/makerlisp: This commit brings in a new configuration to support execution entirely out of external SRAM.
Squashed commit of the following:

    configs/makerlisp/scripts/makerlisp_ram.linkcmd:  Fixup .RESET and .STARTUP.  These need to be redirected to RAM since they default to ROM.

    configs/makerlisp/scripts/makerlisp_ram.linkcmd:  Restore some settings that should be unnecessary but are really required by the current implementation.

    configs/makerlisp:  Rename nsh configuratinon to nsh_flash.  Create new configuration, nsh_ram, that is identical to the nsh_flash configuration except that the code runs out of external SRAM.

    configs/makerlisp/scripts:  Add a linker script to support execution from RAM.
2019-06-26 09:56:20 -06:00
Alin Jerpelea
bfda93d66b Merged in alinjerpelea/nuttx (pull request #915)
arch: arm: cxd56xx: I2C, SPISD, Charger and Gauge

* arch: arm: cxd56xx: add I2C character driver

    for testing purposes, we use the CXD56_I2C_DRIVER to register the
    /dev/i2c[] character devices.

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

* configs: spresense: use I2C character driver

    We should use the CXD56_I2C_DRIVER to register the /dev/i2c[]
    character devices.

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

* arch: arm: cxd56xx: add battery gauge driver

    add battery gauge driver for cxd56xx chip

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

* arch: arm: cxd56xx: add charger driver

    add charger driver for cxd56xx chip

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

* arch:arm: cxd56xx: add SPI SDCard configuration

    Add SPI SDCARD functionality configuration

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

* configs: spresense: enable gauge driver

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

* configs: spresense: enable charger driver

    enable charger driver on spresense board

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-25 12:06:47 +00:00
Gregory Nutt
aa7a6825d0 arch/arm/src/efm32/efm32_usbhost: Apply Adam Porter's STM32 fix to EFM32 which has the same IP. 2019-06-24 07:50:24 -06:00
Alin Jerpelea
c62d90fdb7 Merged in alinjerpelea/nuttx (pull request #914)
configs: spresense: add I2CTOOL support and extend GPIO for future use

* arch: arm: cxd56xx: add delay support

    add delay support for cxd56xx chip

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

* configs: spresense: register I2C busses

    for development is usefull to register I2C busses when the I2CTOOL
    is built

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

* configs:spresense: enable GPIO interface

    enable GPIO interface on spresense board

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-24 13:39:46 +00:00
Adam Porter
37c4fb5477 In stm32_ctrlout() in the HS and FS host drivers, the data buffer isn't sent. This patch passes the buffer and buflen to the stm32_ctrl_senddata() function. With this change, I am able to send MBIM control messages to my USB modem, and read the response. 2019-06-23 07:05:21 -06:00
Gregory Nutt
d8c282a9b6 arch/arm/src/imxrt/Kconfig: Trivial correction to a variable description. 2019-06-21 09:07:52 -06:00
Adam Porter
af9b70ca5d STM32,F7,H7,L4 OTG FS/HS: Fix constant using in comparison to determine endpoint is interrupt type. 2019-06-20 06:58:35 -06:00
Adam Porter
ac46dbbffd drivers/usbhost: Remove duplicate const in usbhost files. 2019-06-20 06:49:56 -06:00
Gregory Nutt
ad0181a6d4 arch/z80/src/ez80/ez80_spi.c: Fix a poorly constructed loop that would lead to hangs. 2019-06-18 09:28:13 -06:00
Gregory Nutt
4bfa6fe511 arch/z80/src/ez80: Correct setting of RTC time. 2019-06-18 08:32:31 -06:00
Alin Jerpelea
2a32f36540 Merged in alinjerpelea/nuttx (pull request #909)
arch: arm: cxd56xx: SCU, ADC, I2C

* nuttx: configs: spresense: LEDS: fix warnings

    In the initial code several errors were missed because I pushed
    the dirty code.

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

* arch: arm: cxd56xx: add Sensor Control Unit (SCU)

    Add Sensor Control Unit (SCU) on cxd56xx chip

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

* arch: arm: cxd56xx: add I2C support

    add I2C support on cxd56xx chip

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

* arch: arm: cxd56xx: add ADC interface support

    Add ADC interface support on cxd56xx chip

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

* arch: arm: cxd56xx: Use DMAC for reading sensing data

    Use DMAC for reading sensing data from SCU on cxd56xx chip

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

* arch: arm: cxd56xx: code style sanitization

    NuttX does not use Deoxygen for documentation and no file should contain Doxygen tags or Doxygen style comments.

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

* configs: spresense: enable I2CDEV

    add enable I2CDEV for spresense board

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

* configs: spresense: add notification LEDs

    Add usefull diagnostic LEDs on the speresense board

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-18 12:46:43 +00:00
Alin Jerpelea
f50080b251 Merged in alinjerpelea/nuttx (pull request #907)
arch: arm: cxd56xx: add UID support

* arch: arm: cxd56xx: add UID support

    Add support to be able to read the HW UID

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

* configs: spresense: enable USERLEDS

    add USERLED for spresense board

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-17 22:02:19 +00:00
Gregory Nutt
4d78132c46 arch/z80/src/ez80: Fix a bad SPI register address definition. Clean up RTC lower half driver problems. Update a README. 2019-06-17 15:20:28 -06:00
Gregory Nutt
df5ed6e08a Merge branch 'master' of bitbucket.org:nuttx/nuttx 2019-06-17 15:15:30 -06:00
Gregory Nutt
7aa8039179 Squashed commit of the following:
commit f5080f53516a853408dd80f09f85e1d1c139133f
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jun 17 12:24:22 2019 -0600

    arch/z80/src/ez80/ez80_spi.c:  SPI driver still does not work.  But the driver now has timeouts so that at least it does not hang the system on startup.

commit 5241e9ae643981c43c8c7fa8478a01d0c2e17eb0
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jun 17 10:45:11 2019 -0600

    arch/z80/src/ez80:  Fixes to SPI baud rate calculation.

commit ce2e9e3703485563a0a5b6a57e4080ad45d91fd7
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jun 17 09:29:13 2019 -0600

    arch/z80/src/ez80:  Cosmetic and unnecessary clean-up or serial driver.

commit 77287c8508a7e3262068d3e8cf1c5f8e27f3a144
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jun 17 09:08:56 2019 -0600

    arch/z80/src/common and arch/z80/src/ez80:  Clean up some assertion-related logic.

commit 4d2d3594c22f7240119255825fce2d2437301404
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jun 17 07:48:21 2019 -0600

    configs/makerlisp/nsh/defconfig:  Enable STACKDUMP on assertion.

commit 76b7a2faa3f213dd26634dd9440d12f746cac097
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jun 17 07:47:55 2019 -0600

    configs/makerlisp/include/board.h:  Don't put the board in reset on a simple assertion, onlhy a full panic.

commit 0a0dc12edcd39c07696769cb7249d8c39a148ccc
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jun 17 07:46:54 2019 -0600

    arch/z80/src/ez80/ez80_rtc_lowerhalf.c:  Remove all references to alarm ID.

commit 1a4dba1075fcf6466e87520a8ba66bbf91d696d7
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jun 17 07:33:29 2019 -0600

    configs/makerlisp/src/ez80_bringup.c:  Fix an error that was causing MMC/SD to fail to initialize.  Unfortunately now the system hangs.

commit 145a395c7a8e73336fe62caf803d108c59e306a5
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jun 17 07:32:50 2019 -0600

    arch/z80/src/ez80:  Add an RTC lower half driver.  Initial commit is just the STM32 RTC lower half with name changes.
2019-06-17 12:25:43 -06:00
Masayuki Ishikawa
8b5827de43 Merged in masayuki2009/nuttx.nuttx/fix_debug_build_for_sresense (pull request #905)
arch/arm/src/cxd56xx: Fix cxd56_wdt.c in debug build

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-17 00:31:12 +00:00
Gregory Nutt
1fd6c432fc configs/makerlisp/nsh/defconfig: Enable Procfs, RTC, and SPI-based SD support. Various fixes under arch/z80/src/ez80 for a clean compile. 2019-06-16 14:45:38 -06:00
Gregory Nutt
a02858365a arch/z80/src/ez80/ez80_vectors.asm: Fix a logic error in vector initialization 2019-06-16 11:48:29 -06:00
Gregory Nutt
7e05bacd54 configs/makerlisp: Update external memory settings in linker script. 2019-06-16 11:48:29 -06:00
raiden00pl
cad6325589 Merged in raiden00/nuttx_h7 (pull request #904)
stm32g0: Fix error when SINGLEWIRE or SERIALBRK_BSDCOMPAT defined (it reflects changes in STM32H7)

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-16 17:34:09 +00:00
Alin Jerpelea
92892a8dd7 Merged in alinjerpelea/nuttx (pull request #902)
arch: arm: cxd56xx: PM and PWM

* configs: spresense: add SPI configuration

    add SPI configuration for spresense board

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

* arch: arm: cxd56xx: add support for PWM

    add support for PWM for cxd56xx

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

* configs: spresense: enable PWM support

    enable PWM support on spresense board

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

* arch: arm: cxd56xx: add Power Management PROCFS support

    the powermanager procfs support will export
    /proc/pm:
     clock
     power

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

* configs: spresense: enable powermanager procfs support

    The powermanager procfs is disabled by default and need to be enabled
    by the CONFIG_CXD56_PM_PROCFS option

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

* arch: arm: cxd56xx: add timer driver

    Add timer driver for cxd56xx.

    NOTE
    The timer allows a divider of 1, 16 and 256 options

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

* arch: arm: cxd56xx: add Watch Dog Timer

    Add Watch Dog Timer on cxd56xx

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

* configs: spresense: enable timer

    the platform support has been added and now we can use the timers
    on spresense board.

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

* configs: spresense: enable WatchDog timer

    The platform support has been added and now we can use the WatchDog
    Timer on spresense board.

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-14 18:40:06 +00:00
Masayuki Ishikawa
ae2506619f Merged in masayuki2009/nuttx.nuttx/change_cxd56_gpioint_config (pull request #901)
change cxd56 gpioint config

* arch/arm/src/cxd56xx: Change cxd56_gpioint_config to handle argument

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

* configs/spresense: Apply API change of cxd56_gpioint_config()

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-14 04:10:43 +00:00
David Sidrane
81e17306d1 Merged in david_s5/nuttx/master_h7 (pull request #900)
stm32 h7 Add ADC and a few fixes for timer and Serial

* stm32h7:Fix error when SINGLEWIRE or CONFIG_STM32H7_SERIALBRK_BSDCOMPAT defined

* stm32h7:time fixed compile errors with TIM13,TIM14, TIM7

* stm32h7:Added ADC Driver

* stmh7x3:Added ADC pins to pin map

* stm32h7:Added ADC clocking

* nucleo-h743zi:Add ADC

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-13 19:51:12 +00:00
Alin Jerpelea
a5418405d7 Merged in alinjerpelea/nuttx (pull request #897)
configs: spresense: enable SPI Flash

* arch: arm: cxd56xx: organize menu items

    Group all CXD56xx Options in one menu

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

* arch: arm: cxd56xx: add Storage Options menu

    Add Storage Options menu and Peripheral Support comment

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

* arch: arm: cxd56xx: add SPI Flash support

    add SPI Flash support for cxd56xx

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

* configs: spresense: enable SPI Flash

    Enable SPI Flash on spresense board

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-13 15:04:33 +00:00
Juha Niskanen
abc49a6a13 arch/arm/src/stm32l4: if SRAM3 is used as heap, do not power it off in stop 2 mode. 2019-06-13 05:52:40 -06:00
Alin Jerpelea
e69471ba2f Merged in alinjerpelea/nuttx (pull request #896)
arch: arm: cxd56xx: add SPI, DMA and RTC

* arch: arm: cxd56xx: add SPI support

    Add SPI support for cxd56xx chip

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

* arch: arm: cxd56xx: Add DMA support

    Add DMA support for cxd56xx

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

* arch: arm: cxd56xx: add RTC functionality

    Add the RTC functionality for cxd56xx

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

* arch: arm: cxd56xx: add RTC_DRIVER

    Add RTC_DRIVER to cxd56xx

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

* configs: spresense: enable rtc functionality

    Enable RTC functionality on spresense board

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-13 11:12:40 +00:00
Masayuki Ishikawa
06aa50e9bb Merged in masayuki2009/nuttx.nuttx/rndis_on_spresense (pull request #895)
rndis on spresense

* arch/arm/src/cxd56xx: Fix ep0 out packet handling in cxd56_usbdev.c

    This change fixes to handle ep0 out packet which exceeds EP0_MAXSIZE.

    For example, 76 bytes of out packet is sent from rndis host during
    rndis negotiation and finally the packet is split into two out packets
    (64 bytes out packet + 12 bytes out packet). To handle these packets,
    actual ep0reqlen is stored during ep0 out setup stage, and if all
    out packets are received, it dispatches to cxd56_ep0setup(), otherwise,
    it sets up the internal USB DMA to receive remaining out packets.

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

* configs/spresense: Add support for rndis configuration

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-13 05:40:03 +00:00
raiden00pl
aaa173dd37 Merged in raiden00/nuttx_pe (pull request #891)
stm32/stm32_pwm.c, stm32h7/stm32_pwm.c: fix pulsecount for the number of counts greater than 128

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-12 13:22:21 +00:00
Alin Jerpelea
32f89d63f7 Merged in alinjerpelea/nuttx (pull request #890)
Add syscontrol for cxd56xx

* arch: arm: cxd56xx: add sysctl

    Add the syscontrol implementation for cxd56xx.

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

* arch: arm: cxd56xx: timer updates

    Add the function to change the clock speed.

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

* arch: arm: cxd56xx: cxd56_uart updates

    Add pinctrl and clock ctrl functionality.

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

* arch: arm: cxd56xx: add conditional for SDHCI

    The cxd56_sdhci should be built only if CONFIG_CXD56_SDIO is selected

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-11 11:19:31 +00:00
Alin Jerpelea
6498ec8d02 Merged in alinjerpelea/nuttx (pull request #888)
arch: arm: cxd56xx: add Power Management support

* arch: arm: cxd56xx: add Power Management support

    Add power management on the cxd56xx

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

* arch: arm: cxd56xx: add Far API

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-10 23:35:15 +00:00
Alin Jerpelea
750e45ad6e Merged in alinjerpelea/nuttx/code_style (pull request #887)
Code style fixes

* arch: arm: cxd56xx: cxd56_cpufifo fix codestyle

    Only codestyle fix

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

* arch: arm: cxd56xx: cxd56_clock fix codestyle

    Only codestyle fix

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

* arch: arm: cxd56xx: cxd56_gpio fix codestyle

    Only codestyle fix

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

* arch: arm: cxd56xx: cxd56_gpioint fix codestyle

    Only codestyle fix

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

* arch: arm: cxd56xx: cxd56_irq fix codestyle

    Only codestyle fix

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

* arch: arm: cxd56xx: cxd56_pinconfig fix codestyle

    Only codestyle fix

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

* arch: arm: cxd56xx: cxd56_pmic fix codestyle

    Only codestyle fix

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

* arch: arm: cxd56xx: cxd56_sdhci fix codestyle

    Only codestyle fix

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

* arch: arm: cxd56xx: cxd56_start fix codestyle

    Only codestyle fix

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

* arch: arm: cxd56xx: cxd56_usbdev fix codestyle

    Only codestyle fix

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-10 13:00:57 +00:00
raiden00pl
e923c7683b Merged in raiden00/nuttx_pe (pull request #886)
Fixes for STM32F1 PWM

arch/arm/src/stm32/hardware/stm32f1xxx_pinmap.h: fix names for complementary PWM outputs

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-10 09:25:54 +00:00
Gregory Nutt
495a648573 arch/z80/src: Rename up_doirq.c and up_internal.h to z80_doirq.c and z80_internal.h for better consistency with the naming conventions 2019-06-09 19:08:42 -06:00
Gregory Nutt
0148124e33 Squashed commit of the following:
nuttx/arch/z80/src:  To properly follow the coding standard, the z80 architecture common should up_mmuinit should be called z80_mmu_initialize.

    nuttx/arch/z80/src:  To properly follow the coding standard, the z80 architecture common should up_loweserialinit should be called z80_lowserial_initialize.

    configs/z80sim/src/z80_serial.c:  Remove unused function up_earlyserialinit()

    nuttx/arch/z80/src:  To properly follow the coding standard, the z80 architecture common should up_serialinit should be called z80_serial_initialize.

    nuttx/arch/z80/src:  To properly follow the coding standard, the z80 architecture common should up_doirq should be called z80_doirq.

    arch/z80/src/common:  up_addregion() must be prototyped in nuttx/mm/mm.h, not up_internal.h
2019-06-08 22:01:53 -06:00
Gregory Nutt
d39ac6c3a1 arch/z80/src/common: Fix some name of internal z80-family common functions. ez80_* is wrong. up_ is misleading. 2019-06-08 11:36:55 -06:00
Gregory Nutt
f5b890d098 Squashed commit of the following:
arch/z80/src/ez80:  Clean-up RTC driver; get a clean compilation.  Still untested.

    arch/z80/src/ez80:  This brings the RTC to code complete, but does not yet compile.

    arch/z80/src/ez80/ez80_rtc.c:  Bring in badly ported RTC driver from STM32F4.  Little more than naming changing at this point not even ready to attempt comilation

    arch/z80/src/ez80:  Add RTC driver.  Initial commit is just the STMF4 RTC driver with name changes.
2019-06-08 09:58:24 -06:00
Gregory Nutt
1f3958116a arch/z80/src/ez80/Make.defs: Fix some backward conditional loic 2019-06-07 13:23:54 -06:00
Gregory Nutt
fbb6f6cde0 configs/: Rename ZDS-II start files from xxx_lowinit.c to xxx_boot.c; rename board initialization logic from xxx_lowinit() to xxx_board_initialize(). These changes make the ZDS-II configurations more similar to board initialization conventions to used for other architectures. 2019-06-05 10:14:58 -06:00
Gregory Nutt
2c1e905aa6 Merge branch 'master' of bitbucket.org:nuttx/nuttx 2019-06-05 09:39:05 -06:00
Gregory Nutt
cf8268f7d8 configs/makerlisp/src/ez80_lowinit.c: Remove redundant SPI GPIO setup. This is already done in the SPI driver.
configs/makerlisp/src/ez80_spi.c:  Add hooks needed by SPI driver.  Move SPI MMC/SD chip selected configuration from ez80_lowinit.c to here as it done in other NuttX architectures.  This enables support for multiple devices on the SPI bus.
2019-06-05 08:20:00 -06:00
Alin Jerpelea
215a146f2e Merged in alinjerpelea/nuttx (pull request #884)
arch: arm: cxd56xx: add support for USB and SDIO

* arch: arm: cxd56xx: add support for USB connectivity

    Add basic support for USB connectivity

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

* arch: arm: cxd56xx: add SDHCI support

    We add SDHCI driver for the cxd56xx

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-05 14:05:56 +00:00
Alin Jerpelea
95c168ccc9 Merged in alinjerpelea/nuttx (pull request #882)
arch: arm: cxd56xx: add Package Configuration

The CXD56xx can come in FCBGA 185 pin or WLCSP 100 pin package.

For each package we have to pick the right pin setup.

The default configuration is set to FCBGA 185 pin package

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-05 11:58:00 +00:00
Alin Jerpelea
eeedce32c4 Merged in alinjerpelea/nuttx (pull request #881)
updates for arch: arm: cxd56xx:

* arch: arm: cxd56xx: add pinconfig

    Add the HW pin configuration for cxd56xx

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

* arch: arm: cxd56xx: add GPIO support

    Add GPIO support for cxd56xx

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

* arch: arm: cxd56xx: add support for GPIO interrupts

    add support for GPIO interrupts

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

* arch: arm: cxd56xx: add clock support

    Add clock support for cxd56xx

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

* arch: arm: cxd56xx: add PMIC support

    Add support for PMIC (Power management integrated circuit)
    for cxd56xx chip

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

* arch: arm: cxd56xx: add FIFO CPU schedulier

    add a simple FIFO schedulier that minimizes overhead

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

* arch: arm: cxd56xx: add ICC support

    add Inter Core Communication for cxd56xx

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-05 11:29:51 +00:00
Gregory Nutt
4e98980045 Add initial support for the MakerLisp eZ80 board. Ref: https://makerlisp.com/
Squashed commit of the following:

    configs/makerlisp:  Update comments about use of serial console.

    configs/makerlisp:  Add LED support, remove vestiges of button support (the board has no user buttons).  Add support for SPI-based MMC/SD card slot.

    arch/z80/src/ez80:  Fix some link problems.

    libs/libc/syslog/lib_syslog.c:  The ZDS-II toolchain does not declare va_coy in stdarg.h.  I think that the use of va_copy in vsyslog() is no necessary.

    configs/makerlisp:  Initial configuration directories cloned from ez80f910200zco with little more than naming changes.
2019-06-04 11:12:17 -06:00
Gregory Nutt
4a7f0166cf arch/z80/src/ez80/ez80_i2c.c: Cosmetic changes from code review. Also makes I2C and SPI configurable options. 2019-06-04 06:49:45 -06:00
Gregory Nutt
6fbfd00396 arch/z80/src/ez80/ez80_spi.c: Cosmetic changes from code review. 2019-06-03 23:59:53 -06:00
Gregory Nutt
59f3180179 Re-verify ez80 build. Fixes to other ZiLOG architectures broke ez80 again. 2019-06-03 19:04:24 -06:00
Gregory Nutt
622c272ea3 Clean up some variouis compiler problems using SDCC to compiler Z180. 2019-06-03 18:16:23 -06:00
Gregory Nutt
7ab149d8e9 Various fixes to get a clean compile with the SDCC compiler. Compile is 'almost' clean. 2019-06-03 16:53:11 -06:00
Gregory Nutt
fd4436f559 arch/z80/src/Makefile.zdsiil: Minor cleanup 2019-06-03 15:35:36 -06:00
Dave Marples
a2def2a4d1 arch/arm/src/common/up_lwl_console.c: Add support for a 'Lightweight Link' protocol between a target and debugger for use when you need a console but the target doesn't have a spare serial port or other available resource. 2019-06-03 07:31:17 -06:00
raiden00pl
04ea439121 Merged in raiden00/nuttx_h7 (pull request #880)
Initial PWM support for STM32H7

arch/arm/src/stm32h7: port PWM from STM32

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-03 11:51:00 +00:00
Gregory Nutt
167ecaa496 arch/z16/src/z16f/Kconfig and configs/z16f2800100zcog/scripts/Make.defs: Add support for the lastest 5.2.1 version of the ZDS-II toolchain. 2019-06-02 19:21:00 -06:00
Gregory Nutt
87fd570d3a arch/z16/src: Replicate build changes make for ez80 and z8 for zneo. 2019-06-02 18:43:43 -06:00
Gregory Nutt
27bb130bf8 arch/z80/src/: Fix a few more ez80 compile issues. Update README files. 2019-06-02 18:35:32 -06:00
Gregory Nutt
fc79fc5ce1 arch/z80/src: Fix ez80 compile problems due to New ZDS-II toolchain and ongoing bit rot due to non-C89 code creeping into the core OS. 2019-06-02 15:36:38 -06:00
Gregory Nutt
2767e80459 Squashed commit of the following:
ez80:  Fixing a few more compile problems.  I am afraid that the 5.3.0 compiler it too buggy to use.
    ez80:  Additional build-related fixed.
    eZ80:  Updating to use the newest ZDSII 5.3.0 toolchain.
2019-06-02 11:05:31 -06:00
Mateusz Szafoni
dffed7ab51 arch/arm/src/stm32f0l0g0/stm32g0_rcc.c: Fixes some problems found in build testing. 2019-05-31 09:22:07 -06:00
rajan gill
0ceac9a969 arch/arm/src/stm32/stm32_adc.c: The attached patch fixes a compilation error when verbose analog debugging is enabled for the stm32 adc: not all stm32s have an SQR4 register. 2019-05-31 08:50:38 -06:00
Dave Marples
d518cbb170 arch/arm/src/stm32/Kconfig: Add MEDIUM_DENSITY selection. 2019-05-31 07:55:43 -06:00