Commit Graph

10947 Commits

Author SHA1 Message Date
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
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
Alan Carvalho de Assis
9e4cd2f720 arch/arm/src/xmc4/: Fix USIC_BRG_SCLKCFG definition 2018-02-09 13:00:20 -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
5beab6fbf0 spin_lock_irqsave() and spin_unlock_irqrestore() are only valid if the CPU supports global disabling of interrupts. 2018-02-04 15:41:22 -06:00
Gregory Nutt
5c5d19f1c8 Some ommissions from previous commit. 2018-02-04 12:36:51 -06:00
Gregory Nutt
1e59d9dd14 armv7-a, armv7-r, armv7-m: Add atomic read-add-write and read-subtract-write functions. 2018-02-04 12:22:03 -06:00
Gregory Nutt
2683f713ab Make sure that labeling is used consistently in all function headers (part 3). 2018-02-01 12:17:03 -06:00
Gregory Nutt
1567b82429 Make sure that labeling is used consistently in all function headers (part 2). 2018-02-01 12:03:55 -06:00
Gregory Nutt
7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Stewart
be81893b55 arm/src/kinetis: Correct some Ethernet PHY register bit tests for the KSZ8081 PHY. 2018-02-01 07:24:36 -06:00
Gregory Nutt
1550ef2f54 arch/arm/src/lpc43xx: Correct a typo introduced in last large set of changes 2018-01-31 11:32:43 -06:00
Gregory Nutt
da50646bcf sched/wdog: wd_start() is an internal OS function and should not set the errno value. Reviewed and updated every call to wd_start() to verify if return value is used and if so if the errno value is accessed. 2018-01-31 10:09:14 -06:00
Matt Thompson
1f10a9c576 Merged in extent3d/nuttx/i2c (pull request #588)
SAMDL: Added I2S register definitions

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-01-31 13:29:23 +00:00
Gregory Nutt
3521aaf944 Squashed commit of the following:
binfmt/, configs/, grahics/, libc/, mm/, net/, sched/:  OS references to the errno variable should always use the set_errno(), get_errno() macros
    arch/arm/src/stm32 and stm32f7:  Architecture-specific code is not permitted to modify the errno variable.  drivers/ and libc/:  OS references to the errno variable should always use the set_errno(), get_errno() macros
2018-01-30 17:57:36 -06:00
Gregory Nutt
82982f7972 sched/: Fix several inappropriate accesses to get_errno() that were missed in previous changes (some going back to nuttx-.23). Add new nxsched_setscheduler() and nxsched_getaffinity() which are equivalent to their counterparts without the nx on front. These versions do not modify the errno value. Changed all calls within the OS to use these newer versions of the functions. 2018-01-30 16:16:41 -06:00
Gregory Nutt
170a50c690 Squashed commit of the following:
sched/sched:  Correct some build issues introduced by last set of changes.
    sched/sched:  Add new internal OS function nxsched_setaffinity() that is identical to sched_isetaffinity() except that it does not modify the errno value.  All usage of sched_setaffinity() within the OS is replaced with nxsched_setaffinity().
    sched/sched:  Internal functions sched_reprioritize() and sched_setpriority() no longer movidify the errno value.  Also renamed to nxsched_reprioritize() and sched_setpriority().
    sched/sched:  Add new internal OS function nxsched_getscheduler() that is identical to sched_getscheduler() except that it does not modify the errno value.  All usage of sched_getscheduler() within the OS is replaced with nxsched_getscheduler().
    sched/sched:  Add new internal OS function nxsched_setparam() that is identical to sched_setparam() except that it does not modify the errno value.  All usage of sched_setparam() within the OS is replaced with nxsched_setparam().
    sched/sched:  Add new internal OS function nxsched_getparam() that is identical to sched_getparam() except that it does not modify the errno value (actually, the previous value erroneously neglected to set the errno value to begin with, but this fixes both issues).  All usage of sched_getparam() within the OS is replaced with nxsched_getparam().
2018-01-30 11:08:18 -06:00
Matt Thompson
20016b841a Merged in extent3d/nuttx (pull request #587)
SAMDL: Added Timer Compare for Control registers header

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-01-29 19:20:00 +00:00
Bob Feretich
a0cd711334 I have a SPI bus with both Mode 0 and Mode 3 devices on it. After performing SPI I/O to a Mode 0 device, switching to a Mode 3 device locked up the SPI interface. Only zeroes would be read. I traced the reason for the lock-up to arm/arm/src/stm32f7/stm32_spi.c function spi_setmode(). Changing the mode causes a spurious SPI clock transmission that confuses the stm32f7 SPI input hardware. This problem is solved by (1) changing the SPI mode with SPI (and perhaps DMA) disabled, and (2) flushing the receive FIFO if the mode change results in garbage in the FIFO. 2018-01-29 07:23:52 -06:00
Matt Thompson
c5e231bedd SAMDL: Added Analog Comparator headers and basic initialization 2018-01-28 21:11:37 -08:00
Mateusz Szafoni
0afbcb0bab Merged in raiden00/nuttx (pull request #585)
Master

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-01-28 13:46:17 +00:00
raiden00pl
cec8709ec1 stm32/Kconfig: fix COMP7 dependency
stm32_hrtim: add HRTIM push-pull mode configuration

stm32f334-disco: add buck-boost converter mode
2018-01-28 11:06:08 +01:00
Gregory Nutt
67d09e831b Fix recurring typo: *tino->*tion 2018-01-27 13:34:58 -06:00
Gregory Nutt
12e3e47d3c Update comments, mostly spelling errors. 2018-01-27 09:37:46 -06:00
Gregory Nutt
49d07162bf arch/arm/src/stm32: stm32_rtcc.h should be used to access BKP registers on F2, F3, and F4. 2018-01-26 11:34:48 -06:00
Gregory Nutt
bffa425233 arch/arm/src/stm32: stm32_bkp.h should only be used for STM32 F1 2018-01-26 11:26:40 -06:00