Commit Graph

12442 Commits

Author SHA1 Message Date
Andrey Zabolotnyi
e5f5509054
stm32h7: Added basic support for STM32H753II. (#527)
Co-authored-by: Андрей Заболотный <zapparello@ya.ru>
2020-03-10 07:55:18 -07:00
Ouss4
a506012074 arch/arm/src/stm32/stm32_uart.h: Fix nxstyle complaints. 2020-03-10 06:53:00 -05:00
Markus Bernet
b50aa49953 stm32/stm32f7/stm32h7: Fix bugs in SERIAL_CONSOLE definition 2020-03-10 08:08:20 -03:00
YAMAMOTO Takashi
d4b0590abb Fix some nxstyle complaints in arm addrenv 2020-03-10 03:55:25 -05:00
Petro Karashchenko
3fa6baec98 spi: change spi_send() interface to support of 32-bit word transfer
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2020-03-09 08:03:35 -06:00
liuhaitao
29be471f58 sama5/serial: correct usage of USE_SERIALDRIVER and USE_EARLYSERIALINIT
Also fix the following build warning:
chip/sam_serialinit.c: In function 'sam_earlyserialinit':
chip/sam_serialinit.c:71:4: warning: implicit declaration of function 'uart_earlyserialinit'; did you mean 'sam_earlyserialinit'? [-Wimplicit-function-declaration]
   71 |    uart_earlyserialinit();
      |    ^~~~~~~~~~~~~~~~~~~~
      |    sam_earlyserialinit

Change-Id: I93adc5be739c222482b552b6e143e44c8c047794
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-03-09 08:00:56 -06:00
Johanne Schock
757c37fbc9 fixed long line warnings from nxstyle 2020-03-08 08:52:46 -06:00
Johanne Schock
ac1f5d673a Fixed formatting and comments in board.h and kinetis_k28memorymap.h
Fixed clock calculation in board.h
2020-03-08 08:52:46 -06:00
Johanne Schock
050e45bfe7 Changes for Freedom K28 USB device support 2020-03-07 13:07:37 -06:00
Gregory Nutt
493b8de938 Revert "Change SAMA5 files to have apache license headers:"
This reverts commit f735584514.

These header changes introduce unacceptable errors:

1. The changes alter the width of the initial block comment.  That will cause nxstyle failures on most of the files.

2. The third line of the header is an (optional) short description of content of the the file.  This change erroneously removes that line.

Automated header file changes can screw up a lot of files, very quickly.
2020-03-07 08:47:48 -03:00
Adam Feuer
2478d12a0a arch/arm/src/sama5/hardware/_sama5d3x_memorymap.h: Restore lines (#464)
Restore lines from bad nxstyle fixes; restore file to previous state
2020-03-06 16:51:15 -06:00
Juha Niskanen
9f6df9ce62 arch/arm/src/stm32l4/stm32l4_iwdg.c: Do not unconditionally enable debug
The DBGMCU_APB1_FZ bit persists over regular software resets until next POR-reset. It can impact device power consumption and things that persist over resets are a bane for FOTA updates so make it disabled by default.

OpenOCD sets this via DAP when connecting to target so enabling this from Kconfig is only useful for users of some other debug tooling.
2020-03-06 07:09:35 -06:00
Adam Feuer
f735584514 Change SAMA5 files to have apache license headers:
- No code changes
- All files are now utf-8 encoded
- Some non-utf-8 characters in comments were changed or removed
2020-03-06 10:33:08 +00:00
patacongo
730133d84a SAMA5D27 peripheral support - USB Host working (#444)
* SAMA5D27 peripheral support - USB Host working

    - updated nsh defconfig with vfat for testing USB Host
    - sama5d2_xult: USB Host worked.
    - ported sam_bringup.c code from sama5d3-xplained
    - USB 2.0 HS now working
    - other perpherals may work, but haven't been tested

* update license headers to approve NuttX Apache-2.0
2020-03-05 18:24:11 -06:00
GOERLITZ Otmar
9623ffaf6d arch/arm/src/stm32/hardware/stm32f30xxx_rcc.h: Correction to RCC_CFGR3 definitions 2020-03-03 17:23:50 -06:00
Gregory Nutt
a21120e3b6 Correct PR424 to coding standard
Run all .c files modified by PR424 through nxstyle and correct most of the complaints (many long line complaints ignored for now).  Update file headers to use Apache 2.0 license.
2020-03-03 13:59:54 -06:00
Daniel Agar
415fc17e98 stm32h7: spi_exchange (no dma) available with CONFIG_STM32H7_SPI_DMATHRESHOLD 2020-03-03 13:30:52 -06:00
Daniel Agar
a0169e4c37 stm32f7: spi_exchange (no dma) available with CONFIG_STM32F7_SPI_DMATHRESHOLD 2020-03-03 13:30:52 -06:00
Daniel Agar
0600d08d1a stm32: spi_exchange (no dma) available with CONFIG_STM32_SPI_DMATHRESHOLD 2020-03-03 13:30:52 -06:00
GAEHWILER Reto
e31f0f37f1 arch/arm/src/stm32h7/stm32_ethernet.c: Fix for network lock downs
Fix for network lock downs due to not freed buffers
2020-03-03 09:33:18 -06:00
GAEHWILER Reto
85e461c59c STM32H7/STM32F30: Typos, register correction and extension
* Correction in stm32h7x3xx_rcc
* Adding GPIO_TIM2_CH1OUT_1 to stm32f30xxx_pinmap
* Comment typo fix in drivers/mmcsd/mmcsd_spi.c
2020-03-03 09:20:58 -06:00
GAEHWILER Reto
7ffb5c11a0 arch/arm/src/stm32h7/stm32_ethernet.c: Re-organization of stm32_phy_boardinitialize
PHY has to be up and running before ethreset call
2020-03-03 09:18:02 -06:00
Juha Niskanen
f3490e42c3 Fix typos in comments 2020-03-03 09:11:57 -06:00
johannes-nivus
a7d783d463 NXP Freedom K28F Board SD-Card support (#423)
* Adds SDHC support for NXP Freedom-K28F
2020-03-03 09:06:17 -06:00
Daniel Agar
30a48e4217 arm/stm32h7 add STM32H7_SPI_DMATHRESHOLD 2020-03-02 23:08:12 +01:00
Daniel Agar
c10fbbbb5f stm32f76xx77xx_dma.h fix DMAMAP_SPI2_RX_2/DMAMAP_SPI2_TX_2 2020-03-02 23:08:12 +01:00
Daniel Agar
608b59792e arm/stm32f7 add STM32F7_SPI_DMATHRESHOLD 2020-03-02 23:08:12 +01:00
Daniel Agar
afb2248b7a arm/stm32 add STM32_SPI_DMATHRESHOLD 2020-03-02 23:08:12 +01:00
Augusto Fraga Giachero
0be87af99d arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c: Cancel timeout on i2c stop
Not canceling the I2C timeout watch dog immediately after finishing
all I2C transactions in interrupt context can lead to a race condition
due to nxsem_wait(&priv->wait) in lpc17_40_i2c_start() not resuming
execution fast enough (this can be easily triggered if another task /
thread is using a lot of cpu time).

Falling to cancel the watchdog up to time will cause the priv->wait
semaphore to be incremented twice (first by lpc17_40_i2c_stop() then
by lpc17_40_i2c_timeout()), so all I2C transactions after that will
return immediately and priv->msgs will hold pointers to memory it
doesn't own anymore.

Canceling the priv->timeout watch dog in lpc17_40_i2c_stop() prevents
this as it is executed from the I2C interrupt handler.

arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c: Fix timeout calculation

For each byte received / transmitted, an acknowledge bit is also
transmitted / received, requiring effectively 9 bits for each byte.
2020-03-02 22:14:05 +01:00
David Sidrane
fd3148dba6
imxrt: Adds the ability to run from OCRAM (#407)
* imxrt: GPIO make tables const
* imxrt: Call out to board to set up FlexRAM
* imxrt: Add Knob for adding the ROM bootloaders 40Kib of RAM to heap
* imxrt: imxrt1060-evk:Add the ability to run from OCRAM
2020-03-01 06:05:42 -06:00
David Sidrane
4a4b2853c2
Add USB Device support for i.MX RT (#408)
* arch/arm/src/imxrt/imxrt_usbdev.c: Add USB Device support for i.MX RT (USB OTG1)

Based on the LPC43xx USB Device driver.

* imxrt:usbotg Nxstyle fixes

Co-authored-by: thomasactia <61285689+thomasactia@users.noreply.github.com>
2020-02-29 14:03:52 -08:00
Joshua Lange
0ce4e15363 Improvements to STM32H7: (i,w)WDG Flash, Ethernet, ADC, etc 2020-02-29 12:33:25 -03:00
Adam Feuer
cbd3e704dc formatting comments 2020-02-28 13:39:36 -06:00
Adam Feuer
6b4f9038d4 fix for SAMA5D2 serial console
authored by Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2020-02-28 13:39:36 -06:00
Masayuki Ishikawa
f6b3e79d61 arch: lc823450: Remove unused variable in lc823450_cpustart.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-27 08:55:25 +01:00
Adam Feuer
cdc61a08e0
arch/arm/src/sama5/sam_gmac: Prevent txtimeout from always firing and fix txbuffer leak during high-volume sends 2020-02-25 23:10:04 +01:00
YAMAMOTO Takashi
9a8169acdf armv7-m: Fix syscall stack alignment
This fixes "df -h" with PROTECTED build.  Tested on qemu.

Reference:
	aapcs32 "6.2.1 The Stack/Stack constraints at a public interface"
2020-02-25 12:05:53 -06:00
YAMAMOTO Takashi
d52628979a Suppress "'noreturn' function does return" warnings
up_pthread_start and up_task_start.
2020-02-25 04:07:02 -06:00
Xiang Xiao
cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
liuhaitao
b4cf5f5dab arch: refine up_serialinit/up_earlyserialinit/rpmsg_serialinit 2020-02-23 09:11:57 -06:00
liuhaitao
c5eab0dc8f arch: use ifdef USE_EARLYSERIALINIT to include up_earlyserialinit
There are cases that USE_SERIALDRIVER is defined but USE_EARLYSERIALINIT not defined in some configs. So use ifdef USE_EARLYSERIALINIT to include up_earlyserialinit anyway.
2020-02-23 09:11:43 -06:00
liuhaitao
8ca4ca5ae8 arch: undef USE_SERIALDRIVER if CONFIG_CONSOLE_SYSLOG
An error was introduced from:

  commit f982ee43db
  Author: Xiang Xiao <xiaoxiang@xiaomi.com>
  Date:   Tue Feb 18 09:55:04 2020 +0800

    drivers/serial: Remove the lowconsole driver

    Replace with the syslog console driver which has more capability than lowconsole
2020-02-23 09:10:06 -06:00
Xiang Xiao
bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06:00
Gregory Nutt
ac8e9ded59 Fix coding standard issues in PR328
Run all .c and .h files modified by PR328 through tools/nxstyle and correct all of the complaints from that tool.
2020-02-20 08:40:17 -06:00
klmchp
ce43f21b33 remove unnecessary irq operation 2020-02-20 08:34:33 -06:00
klmchp
286d8875d5 add eefc driver and read uid 2020-02-20 08:34:33 -06:00
YAMAMOTO Takashi
b363bd0841 Update the comments (the location of trampoline code)
Also, fix typos and copy-and-paste errors.
2020-02-20 14:21:16 +08:00
Masayuki Ishikawa
6ccf08a778 arch: imx6: Add imx_idle.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-19 20:04:58 -06:00
Masayuki Ishikawa
f38f39d410 arch: arm: Select ARCH_GLOBAL_IRQDISABLE for iMX6
NOTE: SMP related behaviour will be same as armv7-m SMP

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-19 20:04:58 -06:00
Masayuki Ishikawa
bbefad449c arch: armv7-a: Apply armv7-m SMP related logic to armv7-a
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-19 20:04:58 -06:00
YAMAMOTO Takashi
2cd2a0af5a
arm hostfs: Compile only when enabled by config (#307)
* arch/arm/src/tiva/Make.defs: Compile only when enabled by configuration CONFIG_ARM_SEMIHOSTING_HOSTFS
*  arch/arm/src/common/up_hostfs.c:  Remove the ifdef conditional because it's redundant with the make logic.
2020-02-19 08:13:12 -06:00
YAMAMOTO Takashi
d5fc2458ba boards/arm/tiva/lm3s6965-ek: Add PROTECTED support
Largely copy-and-paste from stm32f4discovery.

Also arch/arm/src/armv7-m/mpu.h: Ensure RBAR alignment

  Fix crashes on init task startup I observed on qemu-system-arm -M lm3s6965evb.
2020-02-19 07:42:14 -06:00
Masayuki Ishikawa
b9682171f4 arch: armv7-a: Fix stack pointer alignment at startup
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-19 07:25:31 -06:00
Gregory Nutt
fdf673c5c7 arch/arm/src/kinetis/kinetis_serial.c: Correct build test failure.
Correct error:  'TTS0_DEV' undeclared
2020-02-19 10:31:04 +01:00
Xiang Xiao
51a2171c71 ramlog: Remove g_ramlog_syslog_channel since it's same as g_default_channel
And remove syslog_init_e because all initialization is later now and we don't
distinguish the initialition phase anymore after ramlog don't need special
initialize.
2020-02-18 13:04:45 -06:00
Xiang Xiao
dcaaf2d912 ramlog: Remove all ramlog_consoleinit related code
Because we can get the same function by CONSOLE_SYSLOG/syslog_console_init.
BTW, it isn't a good choice to use g_ramlogfops as /dev/console since nsh
will read back what it send out which will surprise most people.
2020-02-18 12:57:43 -06:00
Xiang Xiao
f982ee43db drivers/serial: Remove the lowconsole driver
Replace with the syslog console driver which has more capability than lowconsole
2020-02-18 12:51:09 -06:00
Xiang Xiao
6b77f73583 arch: Move iob_initialize into nx_start just after heap initialization
it doesn't make sense that iob initialization is in up_initialize
but other memory components initialization is called in nx_start

Change-Id: Id43aeaa995f340c5943f59a0067a483ff3ac34a2
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-18 10:26:19 -03:00
Xiang Xiao
e7d9260014 arch: Customize the typedef of size_t instead of intptr_t
To ensure size_t same as toolchain definition in the first place and rename CXX_NEWLONG to ARCH_SIZET_LONG.  The change also check whether __SIZE_TYPE__ exist before CONFIG_ARCH_SIZET_LONG so our definition can align with toolchain(gcc/clang) definition automatically.
2020-02-18 07:15:19 -06:00
Masayuki Ishikawa
e7d44ee16e arch: armv7-a: Fix heap corruption in SMP mode
Currently up_allocate_heap() assumes that g_idle_topstack points
top of the heap memory. However, g_idle_topstack pointed incorrect
address in SMP mode which resulted in heap corruption. This PR
moves g_idle_topstack at the end of .noinit to avoid this issue.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-18 07:06:12 -06:00
YAMAMOTO Takashi
7513cb6921 CONFIG_ARM_SEMIHOSTING_HOSTFS: mention limited support of directories 2020-02-18 17:11:59 +08:00
YAMAMOTO Takashi
9d4e9ce21e Make this build with CONFIG_ARM_SEMIHOSTING_HOSTFS=y 2020-02-18 13:46:33 +08:00
Nathan Hartman
239537fd9d arch/arm/include/tiva/chip.h: Fix typos 2020-02-17 16:50:03 -06:00
YAMAMOTO Takashi
5ebce26cc7 Fix "unused" warnings with CONFIG_TIVA_WITH_QEMU=y 2020-02-17 13:41:10 +08:00
Juha Niskanen
15b78abccf Fix typos in comments 2020-02-14 08:50:45 -06:00
YAMAMOTO Takashi
f79b47ad25 tiva_serial.c: Make this buildable with certain configurations 2020-02-14 15:38:24 +08:00
Nicholas Chin
e1d35096cf arch/arm/src/imxrt/Kconfig: Fixes IMXRT_HAVE_LCD to only be selected by 1052 and 1062 and misc. typos 2020-02-12 09:42:07 -08:00
Nicholas Chin
8469de724a Fixes build issues with IMXRT Qencoder 2020-02-12 09:42:07 -08:00
Gregory Nutt
cfb7561e77 arch/arm/src/armv7-a/arm_vectors.S: Fix clobbered register in SMP mode. 2020-02-12 16:49:32 +01:00
Nicholas C
c4c0d05891 arch/arm/src/imxrt; Adds clock config logic and Kconfig menus for FLEXIO on IMXRT 2020-02-10 20:36:22 -06:00
Xiang Xiao
6d69439f58 Call xxx_timer_initialize from clock subsystem
Call xxx_timer_initialize from clock subsystem to make timer ready for use as soon as possiblei and revert the workaround:

commit 0863e771a9
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Fri Apr 26 07:24:57 2019 -0600

    Revert "sched/clock/clock_initialize.c:  clock_inittime() needs to be done with CONFIG_SCHED_TICKLESS and clock_initialize should skip clock_inittime() for external RTC case since the RTC isn't ready yet."

    This reverts commit 2bc709d4b9.

    Commit 2bc709d4b9 was intended to handle the case where up_timer_gettime may not start from zero case.  However, this change has the side-effect of breaking every implementation of tickless mode:  After this change the tickless timer structures are used before they are initialized in clock_inittime().  Initialization happens later when up_initialize is called() when arm_timer_initialize().

    Since the tickless mode timer is very special, one solution might be to

    1. Rename xxx_timer_initialize to up_timer_initialize
    2  Move up_timer_initialize to include/nuttx/arch.h
    3.  Call it from clock subsystem instead up_initialize

    Basically, this change make timer initialization almost same as rtc initialization(up_rtc_initialize).

    For now, however, we just need to revert the change.
2020-02-08 07:40:06 -06:00
Xiang Xiao
76bbed07a4 Call up_irqinitialize from irq subsystem
Call up_irqinitialize from irq subsystem to make the irq ready for use as soon as possible
2020-02-08 07:39:22 -06:00
Xiang Xiao
a8de37fbec Ensure all source code end with one and only one newline
by this command:
git ls-files -z | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2020-02-08 07:25:56 -06:00
liuguo09
e21c30cf9d
arch/arm/include/stm32f010g0/chip.h: correct wrong #if defined to fix build break (#227)
/home/jenkins/jenkins-slave/workspace/NuttX-Nightly-Build/nuttx/include/arch/stm32f0l0g0/chip.h:53:42: error: missing ')' after "defined"
   53 | #if defined(CONFIG_ARCH_CHIP_STM32F030RC || CONFIG_ARCH_CHIP_STM32F030CC)
      |                                          ^~
/home/jenkins/jenkins-slave/workspace/NuttX-Nightly-Build/nuttx/include/arch/stm32f0l0g0/chip.h:53:45: error: missing binary operator before token "CONFIG_ARCH_CHIP_STM32F030CC"
   53 | #if defined(CONFIG_ARCH_CHIP_STM32F030RC || CONFIG_ARCH_CHIP_STM32F030CC)

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-02-07 08:30:58 -08:00
Peter van der Perk
499607d68f
S32K add support for Nxp drone boards (#224)
* S32K add support for Nxp drone boards

* Update arch/arm/src/s32k1xx/hardware/s32k1xx_rtc.h codestyle

Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com>

Co-authored-by: Jari van Ewijk <jari.vanewijk@nxp.com>
Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
2020-02-07 04:53:40 -08:00
David Sidrane
2d5141baf8
Merge pull request #222 from han1raaijmakers/imxrtI2C
imxrt added missing i2c prescale mask
2020-02-07 04:09:24 -08:00
David Sidrane
cabd6927bc
Merge pull request #223 from han1raaijmakers/KinetisTJA110X
Kinetis renamed TJA1100 to TJA110X registers
2020-02-07 04:08:41 -08:00
Peter van der Perk
d79e673468 imxrt added missing i2c prescale mask 2020-02-07 10:09:43 +01:00
Peter van der Perk
513475c11c Kinetis renamed TJA1100 to TJA110X registers 2020-02-07 10:04:48 +01:00
Alan Carvalho de Assis
7f91a737ea arch/arm/include/stm32f010g0/chip.h: Add support for STM32F030CC 2020-02-06 17:40:05 +00:00
David Sidrane
4c0bc308cc
Merge pull request #212 from bkueng/stm32_spibus_initialize_fix
fix stm32_spibus_initialize: add missing leave_critical_section
2020-02-06 01:33:43 -08:00
Beat Küng
729af004c0
fix stm32_spibus_initialize: ensure leave_critical_section is called
in case the requested SPI bus is invalid or not configured.
2020-02-06 08:05:21 +01:00
Alan Carvalho de Assis
bc00f6e444 arch/arm/src/stm32f010g0: Add memorymap and pimmap support for the
STM32F030RC
2020-02-05 22:38:04 +00:00
Alan Carvalho de Assis
af68c22a2e arch/arm/src/kinetis/kinetis_spi.c: Clear the MDIS bit before trying to
disable TX or RX.
2020-02-04 20:45:00 +00:00
Xiang Xiao
c5b1554d84 Remove NETDEV_LOOPBACK option, NET_LOOPBACK is enough 2020-02-02 08:25:06 -06:00
Xiang Xiao
5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao
80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
Xiang Xiao
68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
David Sidrane
04a7ccdc68 imxrt - interrupt serial storm, add DTCM and set up I and D cache (#175)
* Serial Fixed interrupt storm

  The target would randomly hang in the serial isr.
  The priv->ie and the hardware were inconsistent.
  The isr used the priv->ie to gate offloading
  the RX data. Bang! Hung.

                  imxrt_disableuartint(priv, &ie);
                  ret = imxrt_setup(dev);

                  /* Restore the interrupt state */

                  imxrt_restoreuartint(priv, ie);
       interrupt->  Of no return
                  priv->ie = ie;

   On a fast cpu with FIFO, this will not work
   with out proper protections.

* Serial: Conditionally enable 9 bit mode

* armv7-mi/mpu.hi: Restructure API

   Preserve the existing API and enabled better granualriy on
   setting.

* Enable MPU for non protected builds to set cache

* mpuinit use symbolic values for addresses

* Allow DTCM on HEAP

* allocateheap Fix Coding style
2020-01-29 07:33:19 -06:00
Dave Marples
e99a8d192d Generic SPI interface for controlling an LCD display 2020-01-28 11:32:35 -03:00
taikoyaP
4813b9d751 arch/arm/src/stm32l4/stm32l4_flash.c: Fix flash_erase(page) when page >= 256 (#170)
All STM32L4 MPUs have FLASH_CR_PNB bits (8 bits), and some MPUs have FLASH_CR_BKER bit to change bank if page >= 256.
The code wasn't setting or clearing FLASH_CR_BKER correctly.
2020-01-27 14:56:17 +00:00
YAMAMOTO Takashi
5515e09e8d Fix some "from from" in code comments 2020-01-27 08:46:46 +01:00
Satoshi Togawa
705ac84432 STM32L4: Add workaround of data cache corruption on RWW.
Author: Gregory Nutt <gnutt@nuttx.org>

    Run .c modified by the PR through tools/nxstyle and correct all reporting coding style problems noted in the file.

Author: Satoshi Togawa <togawa@develcb210.centurysys.co.jp>

    STM32L4: Add workaround of data cache corruption on RWW.

    Some STM32L4 chips has eratta "Data cache might be corrupted during Flash Read While Write operation". This is also in STM32, and arch/arm/src/stm32/stm32f20xxf40xx_flash.c has workaround.

    To enable this workaround, define CONFIG_STM32L4_FLASH_WORKAROUND_DATA_CACHE_CORRUPTION_ON_RWW.
2020-01-26 08:57:12 -06:00
Satoshi Togawa
50223920a8 arch/arm/src/stm32l4/hardware/stm32l4_flash.h: Add flash register bit in stm32l4x5
STM32L4x5 MPUs have flash bank register bits similar to STM32L4x6.  But it is not defined on these MPUs in stm32l4_flash.h.  So I define these bits.
2020-01-25 17:46:06 -06:00
patacongo
b46b76c956 Fix implicit definition warnings do to missing inclusion of nuttx/time.h (#162)
Recent changes removed CONFIG_TIME_ENHANCED and unmasked some warnings.  These warnings were caused by nuttx/time.h not being included by files that now referenced clock_daysbeforemonth() and clock_isleapyear().

This commit adds those missing inclusions and eliminates the warnings.

Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
2020-01-24 23:06:19 +01:00
Gregory Nutt
d644b759b2 arch/arm/src/lpc17_40/lpc17_49_ethernet.c: Fix build failure.
Fix these build errors which occurred if there was no PHY:

chip/lpc17_40_ethernet.c:1643:31: error: expected expression before ';' token
  ret lpc17_40_phyinit();

chip/lpc17_40_ethernet.c:3941:1: error: expected identifier or '(' before '{' token
  {

chip/lpc17_40_ethernet.c:448:13: warning: 'lpc17_40_macmode' used but never defined
  static void lpc17_40_macmode(uint8_t mode);
2020-01-23 19:45:41 -03:00
Xiang Xiao
ac4735cf58 Many fixes on Kconfigs and defconfigs do SDIO, NETDEV, USBHOST
Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    Fix warning: selects SDIO_DMA or SDIO_BLOCKSETUP which has unmet direct dependencies (MMCSD)

    Fix warning: selects NETDEV_TELNET which has unmet direct dependencies (NETDEVICES && NET && NET_TCP)

    Fix warning: selects ARCH_PHY_INTERRUPT which has unmet direct dependencies (NETDEVICES && ARCH_HAVE_PHY)

    Fix warning: selects USBHOST_HAVE_ASYNCH which has unmet direct dependencies (USBHOST)

    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-23 11:41:12 -03:00
Xiang Xiao
1e3f457c9e Remove TIME_EXTENDED option to more conform C standard
Gregory Nutt <gnutt@nuttx.org>

    Run all .c and .h files modified in this PR through nxstyle and correct all coding standard problems.

Xiang Xiao <xiaoxiang@xiaomi.com>

    Remove TIME_EXTENDED option to more conform C standard

    Note: the code/data size increment is small
2020-01-23 08:17:22 -06:00
patacongo
1658d75005 arch/arm/src/stm32/stm32_dac.c: Fix warning (#148)
Fix warning found in build testing:  "warning:  'dac_interrupt' defined but not used [-Wunused-function].  The compiler is right, dac_interrupt is not used.  It is, apparently, a placeholder for future interrupt support.  Now conditioned out with #if 0 to suppress build test warnings.

Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
2020-01-22 18:35:38 +01:00
Gregory Nutt
c1f75af084 Fix SAMA5D* warnings
sama5d3-xplained:ethernet-over-phy configuration found in build testing:

  arch/arm/src/sama5/sam_irq.c:  Fix "Control reaches end of non-void function " warning
  arch/arm/src/sama5/sam_udphs.c:  Fix "unused variable 'epno'" warning
  boards/arm/sama5/sama5d*-*/src/sam_usb.c:  Fix "warning 'HAVE_USBHOST' not defined" warnings
2020-01-22 16:42:46 +01:00