Commit Graph

13849 Commits

Author SHA1 Message Date
Gregory Nutt
9c1efc7ab9 drivers/serial/Kconfig: Kconfig is too big, divide into Kconfig, Kconfig-uart, Kconfig-usart, Kconfig-sci, Kconfig-16550. More than one MCU supports LPUARTs. Add Kconfig-lpuart and remove MCU-specific LPUART definitions. Affects Kinetis and STM32L4. 2018-03-14 10:33:27 -06:00
Gregory Nutt
5f0af167df Trivial fix of two typos 2018-03-13 16:39:36 -06:00
Gregory Nutt
b54ffe858a Standardization of some function headers. 2018-03-13 09:52:27 -06:00
Simon Piriou
f62bfca94e Merged in spiriou/nuttx/stm32_lowputc (pull request #613)
arch/arm/src/stm32/lowputc: fix uart glitch when lowputc is enabled

Calling up_lowputc() when a character is in the shift register results
in corrupted character on stm32f1xx and stm32f205 cores.
TC status bit ensures that up_lowputc() waits for an on-going
transmission to complete before writing in TDR.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-03-12 22:01:00 +00:00
Simon Piriou
1f52c13814 Merged in spiriou/nuttx/stm32_usbdev_hid (pull request #611)
arch/arm/src/stm32/usb: skip recipient check for descriptor related requests

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-03-12 20:08:55 +00:00
Juha Niskanen
8b57b7771f arch/srm/src/stm32f7: add PM hooks to ADC, I2C and SPI. 2018-03-06 08:10:50 -06:00
Juha Niskanen
d8311b6493 drivers/power: add pm_unregister 2018-03-06 07:59:17 -06:00
Gregory Nutt
0b277da5fa arch/arm/src.stm32/Kconfig: Reduce redundancy in STM32F401 config settings. 2018-03-05 18:40:45 -06:00
Gregory Nutt
ab5244e855 arch/arm/src/stm32: While we are at it and the differences are fresh in mind, add support for the rest of the STM32F401 family. 2018-03-05 17:36:08 -06:00
Gregory Nutt
33adf2c64d arch/arm/src/stm32: Add support for the STM32F401xB and STM32F401xC families. 2018-03-05 13:45:01 -06:00
Juha Niskanen
628821fdf4 arch/srm/src/stm32f7: Add CONFIG_RTC_PERIODIC support. Also makes the RTC lowerhalf more like in STM32L4. 2018-03-05 07:46:58 -06:00
Gregory Nutt
de6b13b3ab Per OpenGroup.org, syslog -- and, hence, nonstandard vsyslog, and debug wrappers -- does not return a value. Rename _vsyslog to nx_vsyslog. Use internal nx_vsyslog in the few cases where a return value is required. 2018-03-04 08:07:07 -06:00
Gregory Nutt
6c729d6a7b Trivial, cosmetic change from review of last PR 2018-03-04 06:51:37 -06:00
raiden00pl
15dc86ddbb stm32_hrtim: fix capture_get function, add software capture trigger, add software reset trigger, add outputs polarisation configuration 2018-03-04 12:28:26 +01:00
Gregory Nutt
987a8298f2 Fix some errors found in build testing + clean-up some issues with last changes to remove use of printf() from within the OS. 2018-03-03 15:51:27 -06:00
Gregory Nutt
b4f2b0dfc6 Remove all usage of printf() from the OS. That is not an acceptable context for the use of an application-oriented interface that depends on a task-specific file descriptor and C buffered I/O. 2018-03-03 15:20:21 -06:00
Mateusz Szafoni
160931ba72 Merged in raiden00/nuttx (pull request #607)
stm32f33xxx_adc.c: fix bug in RCC reset logic that resets ADC1 configuration when both ADC1 and ADC2 are in use

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-03-02 20:00:52 +00:00
Mateusz Szafoni
2e5bef89b8 Merged in raiden00/nuttx (pull request #606)
stm32_hrtim: add repetition support and fix enum overflow

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-27 18:53:08 +00:00
Juha Niskanen
05f056a770 arch/arm/src/stm32f7: Backport RTC alarm setting changes from STM32L4. Most notably this fixes RTC getting stuck issue when both alarms were used. Root cause was writing RTC ISR register contents to RTC CR register. 2018-02-27 06:50:04 -06:00
Masayuki Ishikawa
82e94a9948 Merged in masayuki2009/nuttx.nuttx/lc823450_dvfs_auto (pull request #604)
lc823450 dvfs auto

* arch/arm/src/lc823450: Fix up_enable_irq() timing for I2S.

    In previous commit, I2S IRQ might be sometimes assigned to CPU1
    when CONFIG_SMP=y. This change fixes this issue.

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

* arch/arm/src/lc823450: Refactor timer driver.

    Introduce lc823450_timer.h and move lc823450_timerisr.c to
    lc823450_timer.c Add MTM timer APIs for DVFS.  Introduce
    up_rtc_gettime() for CONFIG_RTC_HIRES.

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

* arch/arm/src/lc823450: Introduce idle time calculation in DVFS

    Also, DVFS autonomous mode based on CPU idle time is supported.
    NOTE: voltage control is still disabled.

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

* configs/lc823450-xgevk: Update defconfigs

    Enable RTC_HIRES instead of RTC_DATETIME (audio/rndis)
    Disable TCP_WRITE_BUFFERS and change SCHED_LPWORKPRIORITY (rndis)

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

* configs/lc823450-xgevk: Update README.txt

    Update SMP and DVFS related part

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-23 13:26:40 +00:00
Gregory Nutt
5f83631a97 arch/arm/src/sam34: Fix a typo resulting in duplicate names in DMAC bit definitions. 2018-02-22 13:57:20 -06:00
Dmitriy Linikov
a8c58607e9 Merged in hardlulz/modem-3.0-nuttx/fix-sem-EINTR (pull request #603)
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:24:53 +00:00
Juha Niskanen
2fd9728a3a arch/arm/src/stm32: stm32_flash.c: add progmem support for STM32L15XX 2018-02-20 07:05:07 -06:00
Gregory Nutt
8572837d9e Squashed commit of the following:
Author: Juha Niskanen <juha.niskanen@haltian.com>
Date:   Mon Feb 19 15:03:17 2018 -0600

    drivers/mtd:  mtd_config.c:  Add still more error handling (to detect bad underlying flash implementations)
    drivers/mtd:  mtd_config.c:  Remove MTD_ERASE that was erasing data block instead of erase block.  This is a partial revert of 4f18b4.  Reported-by: Pascal Speck <iktek01@yahoo.com>
    arch/arm/src/stm32l4:  stm32l4_flash: change flash programming to use page buffer for unaligned writes.
2018-02-19 15:03:47 -06:00
Gwenhael Goavec-Merou
5ec2b9d6fe arch/arm/src/stm32/stm32f33xxx_rcc.c: A flash wait state configuration. Flash latency must be fixed according to sysclk frequency. If this operation
is not done or done after PLL configuration, the STM32 fail to continue boot
operation if the frequency if greater than 24MHz.  This common t add this operation according to the board variable STM32_SYSCLK_FREQUENCY.  Tested on stm32f334-disco board.
2018-02-17 12:27:29 -06:00
Gregory Nutt
c260ef5d59 arch/xtensa/common: Port the SMP change by Masayuki Ishikawa to the Xtensa family. 2018-02-14 08:58:22 -06:00
Gregory Nutt
3ddea73dc1 arch/arm/src/armv7-a: Port the SMP change by Masayuki Ishikawa to the ARMv7-A family. 2018-02-14 08:36:34 -06:00
Gregory Nutt
d7fae340c1 Trivial changes from review of last PR. 2018-02-14 08:20:40 -06:00
Masayuki Ishikawa
b9707776d6 Merged in masayuki2009/nuttx.nuttx/fix_signal_handing_for_smp (pull request #599)
Fix signal handing for smp

* sched/signal: Remove SMP related logic in sig_dispatch.c

    This change prevents from a deadlock in up_schedulesigaction.c
    where inter-CPU signal handling is actually implemented.

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

* arch/arm/src/armv7-m: Fix signal handling for SMP

    In previous implementation, signal handling for SMP was incorrect.
    Thus, for example, if an inter-CPU signal happened an incorret tcb
    was signaled and caused ASSERT().

    This change fixes the issues and works for both inter-CPU signal
    handling and signal handling on the same CPU.

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-14 14:10:32 +00:00
Alexander Oryshchenko
9b812e3fa3 arm/arm/src/stm32: Corrections to STM32 F4 I2C to fix the NORESTART flag. 2018-02-13 11:41:57 -06:00
Alexander Oryshchenko
643234dbcc arm/arm/src/stm32: Corrections to STM32 F4 I2C to restore functionality. 2018-02-13 08:51:53 -06:00
Gregory Nutt
4a36c946e1 Trivial update to some comments. 2018-02-12 14:46:40 -06:00
Gregory Nutt
4e32861c3c Changes from review of last PR + some updated comments. 2018-02-11 16:42:37 -06:00
Matt Thompson
10de81ebdf Merged in extent3d/nuttx/dma (pull request #597)
SAMDL DMA fixes and experimental SPI support

* SAMDL: Fix DMA controller support

* SAMDL: Added experimental DMA support to SPI driver. spi_exchange() uses a pair of DMA channels for TX and RX

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-11 22:07:18 +00:00
Harald Gutsche
3a029ed185 Merged in hg42/nuttx/lpc17-disable-FDR-2 (pull request #596)
disable LPC17 FDR when not used (second fix)

if a boot loader sets the fractional divider (FDR) the baud rate in
nuttx will be wrong (multiplied by this fraction).

This also has to be added to lpc17_lowputc.c

Unfortunately the constant used for shifting the bits was wrong in the header file, so it took some time to realize this...

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-11 21:24:47 +00:00
Gregory Nutt
a524b33f2c Update some comments 2018-02-11 10:30:45 -06:00
Mateusz Szafoni
118e97ff37 Merged in raiden00/nuttx (pull request #595)
Master

stm32_hritm: add interface to set timer frequency, fix slave timers reset configuration, change POWER_INFO to TIMER_INFO

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-11 13:12:00 +00:00
Matt Thompson
2bb5795e54 Merged in extent3d/nuttx/usb-calibration (pull request #594)
SAMDL: Added loading factory USB calibration data from NVRAM

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-11 13:10:19 +00:00
Matt Thompson
399d59028f Merged in extent3d/nuttx/eic-edge (pull request #593)
SAMDL: Fix EIC interrupt edge sensitivity for pin numbers > 8

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-10 23:24:06 +00:00
Matt Thompson
db05107711 Merged in extent3d/nuttx/clockconfig (pull request #592)
SAMDL: Added FDPLL clock support. Fixed sequence of OSC32K calibration setup

* SAMDL: Added FDPLL clock support. Fixed sequence of OSC32K calibration setup

* fixed code style

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-10 23:20:42 +00:00
Gregory Nutt
642d7e3ce2 Squashed commit of the following:
configs/flipnclick-pic32mz:  Add an nxlines configuration for use in testing the custom HiletGo Click board.
    arch/mips/src/pic32mz:  Correct some SPI-related typos.  configs/flipnclick-pic32mz: Finishes integration of HiletGo OLED. drivers/lcd:  Finish support for HiletGo OLED.
    drivers/lcd:  Add configuration support for HiletGo OLED.  configs/flipnclick-pic32mz:  Add board support for HiletGo OLED.
2018-02-10 09:43:12 -06:00
Alan Carvalho de Assis
9e4cd2f720 arch/arm/src/xmc4/: Fix USIC_BRG_SCLKCFG definition 2018-02-09 13:00:20 -06:00
Gregory Nutt
73ec87109f arch/mips/src/mips32: In up_idle, the kludge that was conditionally enabled if the work queue was enable appears to be needed even when he work queue is not enabled on the PIC32MZ.
arch/mips/src/pic32mz: Fix some typos in debug instrumentation in pic32mz-gpio.c; fix some types releated to UART5 configuration in pic32mz-serial.c.

configs/flipnclick-pic32mz/nsh:  Switch serial console to UART3.  There is some problem with the UART4 RX pin documentation or configuration.
2018-02-09 11:11:44 -06:00
Gregory Nutt
0e6ef003ff Fix some coding standard violations in the last PR. 2018-02-08 16:42:21 -06:00
hg42
da051fb3d9 Merged in hg42/nuttx/lpc17-disable-FDR (pull request #591)
disable LPC17 FDR when not used

* disable LPC17 FDR when not used

    if a boot loader set the fractional divider (FDR) the baud rate in
    nuttx will be wrong (multiplied by this fraction).

    So if it is not used, it should be disabled.

    LPC176x docs say:
    "
    DIVADDVAL Baud-rate generation pre-scaler divisor value.
    If this field is 0, fractional baud-rate generator will
    not impact the UARTn baudrate.

    MULVAL Baud-rate pre-scaler multiplier value.
    This field must be greater or equal 1 for UARTn to operate properly,
    regardless of whether the fractional baud-rate generator is used or not.
    "

    So DIVADDVAL is set to 0 and MULVAL is set to 1.

* symbols found and added

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-08 22:37:58 +00:00
Gregory Nutt
de34b4523f sched/ and arch/arm/src/armv7-a: Replace a few more occurrences of this_task() with current_task(cpu) in an effort to get the i.MX6 working in SMP mode again. It does not yet work, sadly. 2018-02-06 11:17:33 -06:00
Gregory Nutt
8aa1538506 arch/arm/src/armv7-a: Found some additional places were the new this_task() function cannot be called in the i.MX6 SMP configuration. 2018-02-06 10:33:28 -06:00
Masayuki Ishikawa
c8a372702a sched/sched: SMP: Fix this_task() to be an atomic operation. In the previous implementation, this_task() was defined in sched.h by using just a macro current_task(this_cpu()). However, I found that this is not atomic and actually sometimes switching CPU happened in executing the macro when we tested audio steaming plus executing commands via telnet. This change resolves this issue by implementing atomic this_task()in sched_thistask.c which is newly introduced. 2018-02-04 16:59:09 -06:00
Gregory Nutt
31278bc163 Kconfigs: Add comments and a dependency. 2018-02-04 16:32:14 -06:00
Gregory Nutt
8187858d79 Fix a typo just introduced to a Kconfig file 2018-02-04 15:53:01 -06:00