Commit Graph

10751 Commits

Author SHA1 Message Date
Gregory Nutt
9b5f56ba5b BCM2708: The PiZero configuration now compiles and links cleanly. Still a few thngs missing internally. 2017-10-18 14:07:52 -06:00
Gregory Nutt
e18e8573d1 BCM2708: Allow pass parameters with AUX interrupts; Add mini-UART break capability. 2017-10-18 13:57:54 -06:00
Gregory Nutt
bcff0543f9 BCM2708: Add a little more Mini-UART logic. Still missing UART configuration logic. 2017-10-18 13:44:32 -06:00
Gregory Nutt
6235e72ce0 BCM2708: Add a little more Mini-UART logic. Still missing UART configuration logic. 2017-10-18 12:50:56 -06:00
Gregory Nutt
25079a9c93 BCM2708: Fleshes out GPIO interrupt logic. 2017-10-18 10:13:10 -06:00
Gregory Nutt
63b93a9fba BCM2708: Add framework for a Mini-UART driver (incomplete) 2017-10-18 09:17:08 -06:00
Gregory Nutt
3316103efd BCM2708: Add hooks to support both Mini- and PL011 UARTs. 2017-10-18 08:09:24 -06:00
Gregory Nutt
477a8d1aa7 BCM2708: Add support for AUX interrupts. 2017-10-17 17:08:54 -06:00
Gregory Nutt
d160ae8a32 BCM2708: Add some build configuration and support logic for low-level serial otput (unfinished) 2017-10-17 16:26:52 -06:00
Gregory Nutt
851fa7ba85 BCM2708: Fixes off system timer logic for the Pi Zero. 2017-10-17 14:53:11 -06:00
Gregory Nutt
ea23268f34 BCM2708: Add system timer register definitions and a partial implementation of the tickless mode timer. 2017-10-17 13:54:54 -06:00
Juha Niskanen
d101fad026 Merged in juniskane/nuttx_stm32l4/stm32_rtc_small_patches_pr (pull request #511)
Stm32 rtc small patches

* RTC: canceling an alarm marks it as inactive

* STM32L4, STM32F4, STM32F7 RTC: fix reading alarm value that is more than 24h in future

* STM32F0 RTC: fix backup register count in stm32_rtcc.h

    All other STM32: SHIFTR_SUBFS_MASK was correct in STM32F0 only

* STM32L1: use correct EXTI line definitions

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-17 16:45:48 +00:00
Gregory Nutt
3750da237c BCM2708: Flesh out some GPIO logic. 2017-10-17 10:33:48 -06:00
Gregory Nutt
c810a77cca Add skeleton GPIO C files; Add pinmap file. 2017-10-17 08:58:03 -06:00
Gregory Nutt
0fc8978a90 Pi Zero: Add GPIO module header file. 2017-10-17 07:37:44 -06:00
Gregory Nutt
692d4b3dc6 configs/sim: Update touchscreen driver initialization to use only multiple-user NX server logic. 2017-10-15 12:40:01 -06:00
Mateusz Szafoni
61293cfc4c Merged in raiden00/nuttx (pull request #510)
Initial ADC support for the STM32F33XX

* stm32_adc.h: add JEXTSEL definitions and hrtim trigger configuration

* stm32_adc.c: move STM32F33 ADC logic to a separate file

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-15 16:29:05 +00:00
Jussi Kivilinna
51ed697de1 stm32f7 BBSRAM: stm32_bbsram: avoid assert in stm32_bbsram_savepanic. If panic happens before stm32_bbsram is initialized, stm32_bbsram_savepanic caused additional assert panic. Function has null pointer check, so drop DEBUGASSERT. 2017-10-13 07:37:51 -06:00
Juha Niskanen
7c815e555c Merged in juniskane/nuttx_stm32l4/stm32l4_rtc_fixes_pr (pull request #509)
STM32L4 small fixes to RTC

* STM32L4 RTC: init mode was never exited because nested locking in rtc_synchwait() disabled backup domain access

* STM32L4 RTC: use backup register magic value instead of INITS bit

    The INITS (bit 4) of RTC_ISR register cannot be used to reliably
    detect backup domain reset. This is because we can operate our
    device without ever initializing the year field in the RTC calendar
    if our application does not care about correct date being set.

    Hardware also clears the bit when RTC date is set back to year 2000:

    nsh> date -s "Jan 01 00:00:00 2001"
    rtc_dumptime: Setting time:
    rtc_dumptime:   tm: 2001-01-01 00:00:00
    rtc_dumpregs: New time setting:
    rtc_dumpregs:       TR: 00000000
    rtc_dumpregs:       DR: 00012101
    rtc_dumpregs:       CR: 00000000
    rtc_dumpregs:      ISR: 00000037
    ...
    nsh> date -s "Jan 01 00:00:00 2000"
    rtc_dumptime: Setting time:
    rtc_dumptime:   tm: 2000-01-01 00:00:00
    rtc_dumpregs: New time setting:
    rtc_dumpregs:       TR: 00000000
    rtc_dumpregs:       DR: 0000c101
    rtc_dumpregs:       CR: 00000000
    rtc_dumpregs:      ISR: 00000027      <--- Bit 4 went missing!
    ...

    This patch allows us to do:

      stm32l4_pmstop(true);

      /* Stop mode disables HSE/HSI/PLL and wake happens with default system
       * clock. So reconfigure clocks early on Stop mode return.
       */

      stm32l4_clockconfig();

    without stm32l4_clockconfig() doing spurious and harmful backup domain
    reset in rcc_resetbkp().

* STM32L4 RTC: put back the SSR race condition workaround

    ST has confirmed that the issue has not been fixed, and that it applies
    to STM32L4 too (was not in errata sheets due to documentation bug)
    See discussion:

    https://community.st.com/thread/43710-issue-with-rtc-maximum-time-resolution

* STM32F4, STM32L4, STM32F7 RTC: add more CONFIG_RTC_NALARMS > 1 to reduce code size

* STM32L4: rename stm32l4_rtcc.c to stm32l4_rtc.c to better match STM32F7

    Cosmetic changes to comments

* STM32, STM32L4, STM32F7 RTC: stray comment and typos in chip/stm32_rtcc.h

* STM32L4 RTC: change maximum alarm time from 24h to one month

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-13 12:32:33 +00:00
Anthony Merlino
c15b01f32a stm32 SPI: Add missing include required when CONFIG_SPI_CALLBACK is enabled 2017-10-12 11:28:51 -06:00
Gregory Nutt
5350b0f2fe Cosmetic changes related to coding standard. 2017-10-12 09:32:16 -06:00
Manish Kumar Sharma
b12f693b8b arch/arm/src/samv7: Correct an error in RX DMA setup. 2017-10-11 10:54:02 -06:00
Gregory Nutt
eb79a575f6 Fix a few places where there was a semicolon following the 'if' condition, makeing the following logic unconditional. 2017-10-10 14:24:13 -06:00
Gregory Nutt
101eb73014 STM32 Serial: Fix a compilation error introduced in some configurations by a recent PR. 2017-10-10 07:23:55 -06:00
Gregory Nutt
270aa2848a Squashed commit of the following:
BCM2708:  Add enough infrastructrue (more stubs) to get a clean compilation of the Pi Zero configuration (with many undefined things at link time).

    BCM2708:  Add basic interrupt handling logic

    BCM2708: Add interrupt register definitions.

    BCM2708:  Add irq.h header file

    BCM2708/Pi zero:  bcm_boot.c and bcm_memorymap.h now compile.  Added pizero linker script.

    BCM2708/Pi Zero:  Add Make.defs needed to build.

    arch/arm/include/bcm2708, arch/arm/src/bcm2708, configs/pizero:  Add some basic build and configuration logic.

    configs/pizero:  Add some basic structure of the Rasperry Pi Zero port.

    Created directory configs/pizero.  Nothing there now but a README.txt file.

    Add initial boot.c and memorymap.c files
    Author: Alan Carvalho de Assis <acassis@gmail.com>

    Add AUX/UART/SPI registers definition
    Author: Alan Carvalho de Assis <acassis@gmail.com>

    Pizero GPIO registers
    * Initial commit to add GPIO definitions
    * Add remaining GPIO registers definition
    Alan Carvalho de Assis <acassis@gmail.com>

    BCM2708 memory map:  Add VBASE defintions; fix VCSDRAM address per Alan; move all virtual address to the bottom of the file to avoid confusion -- top is all physical address; bottom is all veritural address.

    Add initial memory map to BCM2708/BCM2835
    Alan Carvalho de Assis <acassis@gmail.com>
2017-10-09 13:11:17 -06:00
Gregory Nutt
d0eb182c00 Minor changes from review of last PR 2017-10-09 12:15:05 -06:00
Mateusz Szafoni
6c25f3d142 Merged in raiden00/nuttx (pull request #505)
Master

* power: Add powerled to Kconfig

* stm32_powerled.c: cosmetics

* stm32_hrtim.c: cosmetics

* stm32/Kconfig: add HRTIM configuration and add DAC external trigger configuration

* stm32f334-disco: Add powerled example configuration

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-09 18:07:09 +00:00
Juha Niskanen
798d03cb3d Merged in juniskane/nuttx_stm32l4/stm32_serial_patches_pr (pull request #504)
Stm32, stm32l4 serial patches

* stm32: serial: add interface to get uart_dev_t by USART number, stm32_serial_get_uart

* stm32: serial: do not stop processing input in SW flow-control mode

* stm32l4: serial: do not stop processing input in SW flow-control mode

* stm32l4: serial: suspend serial for Stop mode

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-09 16:20:24 +00:00
Gregory Nutt
ecf6dda2c5 Correct recurring typo: semaphore not semapore 2017-10-09 09:57:56 -06:00
Gregory Nutt
3e40460ab8 lpc31xx: Cosmetic changes. 2017-10-08 19:33:05 -06:00
Gregory Nutt
700f1a8e8c Eliminate some warnings found in build testing. 2017-10-08 16:27:17 -06:00
Mateusz Szafoni
e612ae0803 Merged in raiden00/nuttx (pull request #503)
Master

* stm32_hrtim.c: fix burst mode prescaler update

* powerled.h: add fault field to state structure

* stm32f334-disco: add flash mode support for powerled driver + cosmetics

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-08 19:13:12 +00:00
Gregory Nutt
5b04c25dcd drivers/serial/tcdrain: tcdrain() was recently added to the NuttX C library. But there is a problem. The specification of tcdrain() requires that it be a cancellation point. In order to do this, tcdrain was moved from the C library into the OS and the addition cancellation point hooks were added. In non-FLAT builds, access via system calls is also now supported. 2017-10-06 10:55:36 -06:00
Gregory Nutt
936df1bcb5 Adds new OS internal functions nxsig_sleep() and nxsig_usleep. These differ from the standard sleep() and usleep() in that (1) they don't cause cancellation points, and (2) don't set the errno variable (if applicable). All calls to sleep() and usleep() changed to calls to nxsig_sleep() and nxsig_usleep().
Squashed commit of the following:

    Change all calls to usleep() in the OS proper to calls to nxsig_usleep()

    sched/signal:  Add a new OS internal function nxsig_usleep() that is functionally equivalent to usleep() but does not cause a cancellaption point and does not modify the errno variable.

    sched/signal:  Add a new OS internal function nxsig_sleep() that is functionally equivalent to sleep() but does not cause a cancellaption point.
2017-10-06 10:15:01 -06:00
Gregory Nutt
29b5b3667f sched/semaphore: sem_timedwait() is a cancellation point and, hence, cannot be called from within the OS. Created nxsem_timedwait() that is equivalent but does not modify the errno and does not cause cancellation. All calls to sem_timedwait() change to calls to nxsem_timedwait() in the OS. 2017-10-05 07:24:54 -06:00
Gregory Nutt
9568600ab1 Squashed commit of the following:
This commit backs out most of commit b4747286b1.  That change was added because sem_wait() would sometimes cause cancellation points inappropriated.  But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.

    In the OS, all calls to sem_wait() changed to nxsem_wait().  nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.

    In all OS functions (not libraries), change sem_wait() to nxsem_wait().  This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.

    sched/semaphore:  Add the function nxsem_wait().  This is a new internal OS interface.  It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt
42a0796615 Squashed commit of the following:
sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt
83cdb0c552 Squashed commit of the following:
libc/semaphore:  Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable.  Changed all references to sem_getvalue in the OS to nxsem_getvalue().

    sched/semaphore:  Rename all internal private functions from sem_xyz to nxsem_xyz.  The sem_ prefix is (will be) reserved only for the application semaphore interfaces.

    libc/semaphore:  Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable.  Changed all references to sem_init in the OS to nxsem_init().

    sched/semaphore:  Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.

    sched/semaphoate:  Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Juha Niskanen
2997a49e51 Merged in juniskane/nuttx_stm32l4/stm32l4_rtc_pm_fixes_pr (pull request #502)
STM32L4 RTC, PM: small fixes to subseconds handling, ADC power-management hooks

* STM32L4 ADC: add PM hooks from Motorola MDK

* STM32L4 RTC: add up_rtc_getdatetime_with_subseconds

* STM32 RTC: workaround for potential subseconds race condition

    In all recent STM32 chips reading either RTC_SSR or RTC_TR is supposed to lock
    the values in the higher-order calendar shadow registers until RTC_DR is read.
    However many old chips have in their errata this silicon bug (at least F401xB/C,
    F42xx, F43xx, L15xxE, L15xVD and likely others):

    "When reading the calendar registers with BYPSHAD=0, the RTC_TR and RTC_DR
    registers may not be locked after reading the RTC_SSR register. This happens
    if the read operation is initiated one APB clock period before the shadow
    registers are updated. This can result in a non-consistency of the three
    registers. Similarly, RTC_DR register can be updated after reading the RTC_TR
    register instead of being locked."

* STM32L4 RTC: correct RTC_SSR and RTC_TR read ordering

    In all recent STM32 chips reading either RTC_SSR or RTC_TR is supposed to lock
    the values in the higher-order calendar shadow registers until RTC_DR is read.
    Change the register read ordering to match this and don't keep a workaround
    for a hypothetical race condition (not in any L4 errata, lets for once assume
    ST's silicon works as it is documented...)

* STM32L4 PM: remove useless #ifdefs and old non-L4 STM32 code

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-03 16:39:51 +00:00
Sebastien Lorquet
152164dcaf commit b2ea300b6f broke the STM32L4 port for people not using the L496xx or L4A6xx. That was because stm32l4_sdmmc.h is included from the stm32l4.h global header, and this header fires an #error for other chips. I see that ALL stm32l4 have the same SDMMC except the stm32l4x2, which has none. 2017-10-02 07:43:39 -06:00
Gregory Nutt
10eed5deef Mostly cosmetic changes from review of last PR. 2017-10-01 12:08:52 -06:00
Mateusz Szafoni
67300e23a0 Merged in raiden00/nuttx (pull request #500)
stm32_hrtim: add support for capture, chopper, deadtime and dump registers

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-01 17:52:39 +00:00
Gregory Nutt
c11345ad4b Squashed commit of the following:
STM32, STM32 F7:  LTDC and DMA2D drivers are not permitted to set the errno.

    SIM LPC31xx:  Serial and console drivers are not permitted to set the errno.

    SAMv7, STM32, STM32 L4:  DAC and ADC drivers are not permitted to set the errno.
2017-09-30 11:51:37 -06:00
Gregory Nutt
fa65bad3bf Fix minor spacing issue 2017-09-29 07:34:35 -06:00
Juha Niskanen
e09a31c3b6 Merged in juniskane/nuttx_stm32l4/dfsdm_flash_pr (pull request #497)
STM32L4 FLASH, DFSDM: option bytes, JEXTSEL bits, ADC1 output to DFSDM chips change

* STM32L4 FLASH: add function for modifying device option bytes

* STM32L4 DFSDM: add JEXTSEL bits, ADC1 output to DFSDM chips change

    ST's documentation hints that ADC output can be routed to DFSDM
    on some STM32L4X3 chips, but I got confirmation from tech support
    that this is just a documentation error so remove this from Kconfig.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-09-29 13:32:25 +00:00
Oleg Evseev
ef059f78ac STM32 PWR: Adds stm32_pwr_getsbf and stm32_pwr_getwuf functions that return the standby flag and the wakeup flag PWR power control/status register. 2017-09-28 07:50:21 -06:00
Tomasz Wozniak
96d6bc9376 Build break fix: define PWM_TIM2_CH1CFG for channel 1 PWM 2017-09-26 20:55:23 +02:00
Miha Vrhovnik
b2ea300b6f STM32 L4: Add SDMMC driver 2017-09-26 06:22:39 -06:00
Gregory Nutt
b065b1f5df STM32 Serial: Fix some incorrect conditional compilation 2017-09-23 10:58:50 -06:00
David Sidrane
a3364b5bd9 Merged in david_s5/nuttx/master_stm32_f4_i2c (pull request #490)
stm32:stm32f40xxx I2C ensure proper isr handling

Injecting data errors that causes a STOP to be perceived by the
   driver, will continually re-enter the isr with SB not set and BTF
   and RxNE set.  This changes allows the interrupts to
   be cleared and  propagates a I2C_SR1_TIMEOUT to the waiting task.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-09-21 20:02:05 +00:00
Juha Niskanen
abcaedb990 Merged in juniskane/nuttx_stm32l4/dfsdm_adc_work_pr (pull request #487)
STM32L4 ADC, DFSDM: add routing of ADC data to DFSDM filters

* configs/nucleo-l496zg: add DFSDM initialization

* STM32L4 ADC: add option for routing ADC data to DFSDM, fix DFSDM DMA

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-09-20 12:20:45 +00:00
Gregory Nutt
686129bb2e Cosmetic change from review of last PR. 2017-09-19 06:46:20 -06:00
Juha Niskanen
38f44a627b Merged in juniskane/nuttx_stm32l4/stm32l4_dfsdm_pr (pull request #486)
STM32L4 DFSDM: add peripheral, DAC, TIM: small changes

* STM32L4 DAC: do not configure output pin if it is not used

* STM32L4 TIM: fix compilation of timers with complementary outputs when not PWM_MULTICHAN

* STM32L4 DFSDM: peripheral for digital filters for sigma-delta ADCs

    Initial version. Timer trigger support is not completed and there is
    some issue with DMA.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-09-19 12:36:19 +00:00
Gregory Nutt
882adb2c82 drivers/video/fb.c: Fix a typo introduced in previous commit. 2017-09-17 14:07:08 -06:00
Gregory Nutt
b90b4d40b6 Fix typos/spelling. SAMV71-XULT: Update README, add support for fb_driver. 2017-09-17 10:38:34 -06:00
Rajan Gill
fd9f67c647 STM32 Tickless: The attached patch removes the restriction to 16bit counts when a 32bit timer is used for the new tickless on the stm32. As it is now, the restriction is very limiting, especially if one wants high granularity and large achievable intervals and has the hardware (namely the 32bit timers) available. 2017-09-16 08:20:07 -06:00
Gregory Nutt
37a29cf3a3 LPC31xx: Change naming of some global variables to match coding standard. 2017-09-14 15:33:28 -06:00
Gregory Nutt
13006ecca9 STM32/STM32 F7: Fix some errors found by Coverity. 2017-09-13 13:05:13 -06:00
Rajan Gill
15784ca46f STM32 Tickless: Fixes compilation error when timer info/debug messages are enabled. 2017-09-13 07:14:13 -06:00
David Sidrane
2bbe389897 stm32:Fix coding standard error 2017-09-12 14:16:46 -10:00
David Sidrane
48f0209b84 stm32f7:I2C fixed typo in comment 2017-09-12 14:16:45 -10:00
David Sidrane
ef411578d5 stm32:stm32 alt I2C ensure proper error handling.
Injecting data errors would cause the driver to
  continually reenter the isr with BERR an RxNE.
  This fix allows the error to be cleared and
  propagated to the waiting task.
2017-09-12 14:16:45 -10:00
David Sidrane
617c91b373 stm32:stm32f40xxx I2C ensure proper error handling.
Injecting data errors would cause the driver to
  continually reenter the isr with BERR an RxNE.
  This fix allows the error to be cleared and
  propagated to the waiting task.
2017-09-12 14:16:45 -10:00
Jussi Kivilinna
61878848ad net/sock: recvfrom: Fix double leave_cancellation_point on error path 2017-09-12 07:17:53 -06:00
Gregory Nutt
d76a541a57 Trivial, cosmetic 2017-09-11 19:22:49 -06:00
Masayuki Ishikawa
d95153706a Merged in masayuki2009/nuttx.nuttx/lc823450 (pull request #481)
latest updates on lc823450

* arch/arm/src/lc823450: Conform to the NuttX coding style

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

* arch/arm/src/lc823450: Merge the latest fix in lc823450_rtc.c

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

* arch/arm/src/lc823450: Add ADC driver

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

* arch/arm/src/lc823450: Add watchdog driver

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

* configs/lc823450-xgevk: Enable ADC and watchdog driver

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-09-12 01:00:32 +00:00
Mateusz Szafoni
2ffc2ab875 Merged in raiden00/nuttx (pull request #480)
Master

* smps.c: fix error messages

* stm32f33xxx_hrtim.h: fix definition

* stm32_hrtim: fix pclk calculation

* stm32_hrtim.c: cosmetics

* smps.h: cosmetics

* add upper-half driver for high power LED driver (powerled)

* stm32f334-disco: beginning of lower half driver for high power LED (powerled)

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-09-10 17:43:20 +00:00
Gregory Nutt
435dd39d4c arch/arm/Kconfig: Add more classic ARM11 architecture selections. 2017-09-09 12:44:56 -06:00
Gregory Nutt
3ca3674cca Update/fix last commit: On some STM32's, the CSR regiser is 18 vs. 16 bits wide. Need to use 32-bit register accesses. 2017-09-08 14:21:24 -06:00
Oleg Evseev
3596c75d78 STM32: Add logic for enabling wakeup pins. 2017-09-08 13:23:08 -06:00
Juha Niskanen
3719d0a395 Merged in juniskane/nuttx_stm32l4/stm32l4_adc_kconfig_pr (pull request #478)
STM32L4: ADC, Kconfig small changes

* STM32L4 ADC: port analog watchdog ioctls from the Motorola MDK

* STM32L4: Kconfig: add some L486 and L496 chips, remove duplicates

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-09-06 22:05:44 +00:00
Jussi Kivilinna
449a891a8e stm32f7: add new configuration option for enabling flash ART Accelerator and flash prefetcher 2017-09-04 07:56:51 -06:00
Mateusz Szafoni
23edfe2557 Merged in raiden00/nuttx (pull request #477)
Master

* stm32f33xxx_hrtim.h: add some comments

* stm32_hrtim: add burst mode configuration, rename some definitions

* smps.h: add private data to the smps_s structure

* stm32_hrtim: cosmetics

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-09-03 18:46:41 +00:00
Gregory Nutt
860ff78d55 Kinetis: First cut implementation of the alarm read function. Pretty simple because the Kinetis RTC is just a 1Hz counter. 2017-09-03 12:44:45 -06:00
Gregory Nutt
5f67fc8f1b RTC alarms: getalarmdatetime functions are private and should be declared static. 2017-09-03 12:20:13 -06:00
Gregory Nutt
789e204141 Correct naming of fields in struct alm_rdalarm_s. Should not be the same as the corresponding fields of struct alm_setalarm_s. The whole purpose of that naming convention is to keep the field names unique. 2017-09-03 09:51:47 -06:00
Gregory Nutt
f42a8a38eb Add hooks for Boris Astardzhiev's RTC change for STM32L4 to Kinetis. Lower level logic not yet implemented. 2017-09-03 08:39:03 -06:00
Gregory Nutt
9021e1caeb Port Boris Astardzhiev RTC change for STM32L4 to STM32 2017-09-03 08:39:03 -06:00
Gregory Nutt
01fa856f9b Fix warning introduced with PR to STM32L4 RTC. 2017-09-03 08:39:03 -06:00
Gregory Nutt
92b3c9477a Port Boris Astardzhiev RTC change for STM32L4 to STM32F7 2017-09-03 08:39:02 -06:00
Boris Astardzhiev
b1eceb838b Extend the RTC framework with an alarm read ioctl (RTC_RD_ALARM). Through it consumer could get configuration settings about previously scheduled hardware alarms (active status, hours, minutes, seconds). 2017-09-03 08:39:02 -06:00
Mateusz Szafoni
daac3bd7f8 Merged in raiden00/nuttx (pull request #476)
Master

* stm32_dac.c: fix compilation when DMA disabled for channel

* smps.h: update some comments

* smps.c: more sanity checks

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-09-02 19:52:21 +00:00
Jussi Kivilinna
fe7d8c941c stm32f7: do not enable read-modify-write on DTCM. "AN 4667 - STM32F7 Series system architecture and performance" recommends to disable read-modify-write on DTCM: "If the DTCM-RAM is used as data location and the variables used are byte or/and halfword types, since there is no ECC management in this RAM on the STM32F7 Series, it is recommended to disable the read-modify-write of the DTCM-RAM in the DTCM interface (inthe DTCMCR register) to increase the performance." 2017-09-01 08:01:54 -06:00
Juha Niskanen
258fa08e69 STM32L4 DAC: Fix naming so that DAC1 and DAC2 always refer to channels 1 and 2
User should not be bothered by details like how many IP blocks there are. As no
current STM32L4 has second DAC block (channel 3), remove support for such
hypothetical hardware. DMA channels corrected.

Change-Id: I2cba7e55803871f1ff945538113f12cf5088f68d
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2017-09-01 10:01:03 +03:00
Juha Niskanen
0003ad171d STM32L4 DAC: separate DMA buffer configuration for channels
Change-Id: Ibc6dc90b39b784b5534b8908eaf615bf1ddcb7ed
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2017-09-01 10:00:55 +03:00
Juha Niskanen
4025205772 STM32L4 DAC: add option for routing DAC output to ADC
Actually write something to the DAC DMA buffer.

Change-Id: I1b2516ac26fb17f5242611b56be8926c5f40c2c7
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2017-09-01 10:00:46 +03:00
Gregory Nutt
91d473b816 Revert "stm32 FLASH allow non blocking operation on constrained devices"
This reverts commit ad2ef95ddf.
2017-08-31 15:14:26 -06:00
David Sidrane
9fc283526a Merged in david_s5/nuttx/master_stm32_flash (pull request #474)
stm32 FLASH allow non blocking operation on constrained devices

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-08-31 18:04:07 +00:00
Sergey Ustinov
8c35b2ddca Add the set counter function for stm32 timers 2017-08-31 11:54:00 -06:00
David Sidrane
ad2ef95ddf stm32 FLASH allow non blocking operation on constrained devices
On a very memory constrained device with a single task. The
   sem_wait and sem_post operations can be disabled, to save space.
   The default is blocking enabled.
2017-08-31 07:47:37 -10:00
Sergei Ustinov
795650a2fb I'm worried about the stm32_tim_getcounter funtion. It returns always 32 bits. But major stm32 timers have 16 bits counters. I think, it's not a good idea to return the memory behind the TIMx_CNT register. This changes adds the register size checking. 2017-08-31 11:45:28 -06:00
Gregory Nutt
a7fd8eb203 Trivial removal of a blank line. 2017-08-31 11:36:18 -06:00
Gregory Nutt
27cfde9968 Protected/Kernel Builds: Review us of kmm_addregion vs. kumm_addregsion in other configurations. 2017-08-31 08:49:21 -06:00
Gregory Nutt
69f1399aa7 LPC43xx: Add external RAM to the user heap, not the kernel heap. 2017-08-31 08:12:42 -06:00
Alan Carvalho de Assis
ef3898c2dd LPC43xx: Modify up_allocate_(k)heap() to support PROTECTED mode 2017-08-31 07:58:16 -06:00
Gregory Nutt
9d3b1af1cd ARM syscall logic: Clear bit 0 in PC settings. Bit 0 is the thumb mode indication and should not be set in the PC. 2017-08-30 13:56:03 -06:00
raiden00pl
85c48de040 stm32_hrtim: add DMA configuration 2017-08-28 17:44:14 +02:00
Juha Niskanen
809569cda9 STM32L4 ADC: implement peripheral 2017-08-28 07:05:33 -06:00
Juha Niskanen
a2dc88e075 STM32, STM32L4, STM32F7 ADC: fix channel 18 sample time 2017-08-28 07:05:33 -06:00
Juha Niskanen
e8cd2f88b8 STM32L4 RCC: enable ADC clock source 2017-08-28 07:05:32 -06:00