Commit Graph

32659 Commits

Author SHA1 Message Date
Gregory Nutt
f3c12215cf arch/arm/src/stm32, stm32f0, stm32f7, stm32: Correct naming of global variables that violations the naming requirements of the coding standard. 2018-07-12 10:54:51 -06:00
Masayuki Ishikawa
562637391c Merged in masayuki2009/nuttx.nuttx/lc832450_elf_test (pull request #675)
lc832450 elf test

* arch/arm/src/lc823450: Change CONFIG_DEBUG to CONFIG_DEBUG_FEATURES in lc823450_start.c

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

* configs/lc823450-xgevk: Call elf_initialize() in lc823450_bringup.c

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

* configs/lc823450-xgevk: Add ELF related parameters in Make.defs

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

* configs/lc823450-xgevk: Add elf configuration

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-12 12:05:55 +00:00
Gregory Nutt
b8665996d5 Revert 0eff3d530f: This removes the kx224, bh1749nuc and bh1790glc. These are very nicely written drivers, but they are based on some external sequencer logic which is not available to everyone. Hence, these are inapropriate to carry in the NuttX repository. 2018-07-11 15:36:33 -06:00
Gregory Nutt
6368a0d6a7 Fix trivial coding standard issue 2018-07-11 15:36:33 -06:00
Mateusz Szafoni
639d75ca3a Merged in raiden00/nuttx_h7 (pull request #674)
stm32h7: stm32_irq.c: extend irqinfo to support H7 family

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-11 19:13:55 +00:00
Gregory Nutt
235d580984 drivers/sensors/bh1749nuc.c, bh1790glc.c, and x224.c: From review of commit 0eff3d530f, remove dependency on the CXD56_SCU, modify inclusions and some naming for compatibility with other sensor drivers. 2018-07-10 16:16:15 -06:00
Daniel Pereira Carvalho
8432164e52 arch/arm/src/stm32l4/chip/: Corrects some mistakes in pin definitions for the STM32L4 family. According to datasheet of STM32L496xx, STM32L475xx and STM32L443XX the AF2 of PE14 is TIM1_BKIN2 not TIM2_BKIN. 2018-07-10 08:01:00 -06:00
Juho Valkama
0eff3d530f Merged in jutava/nuttx (pull request #673)
Master

* drivers/sensors: added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* bh1790glc.h created online with Bitbucket

* bh1790glc.h deleted online with Bitbucket

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* README.txt: minor typo fix

* Minor typo fix

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-10 12:38:25 +00:00
Mateusz Szafoni
8271f72b72 Merged in raiden00/nuttx_h7 (pull request #672)
stm32h7: add lowputc, more cosmetic in stm32h7x3xx_rcc.h

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-09 16:32:22 +00:00
ligd
0aa30eb15b include/nuttx/fs/hostfs.h: Update duplicated definitions in HOSTFS that must match NuttX values. 2018-07-09 05:44:48 -06:00
Gregory Nutt
947c10e099 tools/mkexport.sh: Save the User.map file in the export package if available. 2018-07-09 05:42:42 -06:00
Alan Carvalho de Assis
283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Gregory Nutt
1783d344dc Eliminate some new warnings found in build testing. 2018-07-08 13:44:39 -06:00
Mateusz Szafoni
fa56b1bbc7 Merged in raiden00/nuttx_h7 (pull request #671)
stm32h7

stm32h7: compile with stm32_rcc.c

stm32h7: some PWR definitions

stm32h7: add some RCC defs and change some code style to be more like in other STM ports

stm32h7: basic clocks configuration

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-08 18:28:14 +00:00
Gregory Nutt
0e1fc1a280 tools/mkexport.sh: Save the System.map file in the export package so that it can be used to extract addresses. 2018-07-08 12:18:05 -06:00
Mateusz Szafoni
9e63080b4b Merged in raiden00/nuttx/stm32h7 (pull request #670)
stm32h7x3xx: add flash definitions

* libdsp: initial commit

* libdsp: cosmetics

* stm32f334-disco/buckboost: use a PID controller from libdsp

* stm32_adc.h: fix typo

* stm32_dac.c: set OUTEN bit for DAC1CH2 and DAC2CH1

* stm32_hrtim: cosmetic changes

* power/motor: direction parameter is now int8 + add overload fault

* libdsp: all floats with f-sufix

    libdsp: add precision option for library

    libdsp: add debug option for library and assertions in functions

    libdsp: add current samples correction for SVM3

    libds: add some motor control specific functions

    libdsp: add basic speed observer

    libdsp: fix phase shift in SMO observer

    libdsp: add more logic to FOC

    config/sim/dsptest: add dsptest configuration

* libdsp/lib_motor.c: remove unused comparation

* libdsp/lib_observer.c: update some comments

* stm32h7x3xx: add flash definitions

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-08 13:15:44 +00:00
kxjiang
70dc642da3 The LPC54608 can only run at a maximum frequency of 180Mhz. This configuration requires uses the clk_in, external crystal clock, to drive the PLL. When that input was selected, the board bootup failed waiting for the PLL to lock. After referring the driver from NXP, we should turn on power sources for the ext clock if system pll input select clk_in. NOTE that the LPC54628 did not require this step... perhaps because the system oscillator power was already enabled. 2018-07-08 06:58:14 -06:00
Alan Carvalho de Assis
a764e4ab5c drivers/leds/pca9635pw.c configs/stm32f4discovery/src/stm32_pca9635.c: Fix pca9635pw LED driver compilation 2018-07-07 16:24:11 -06:00
Gregory Nutt
1450c0c2f2 arch/arm/src/stm32f7/stm32_sdmmc.c: Fix some missing right parentheses. 2018-07-07 15:23:46 -06:00
Gregory Nutt
6571d4fa37 Update some comments. 2018-07-07 15:23:46 -06:00
Mateusz Szafoni
078fd78af7 Merged in raiden00/nuttx (pull request #669)
libdsp/lib_motor.c: ouch, forgot to change variable name

* libdsp: initial commit

* libdsp: cosmetics

* stm32f334-disco/buckboost: use a PID controller from libdsp

* stm32_adc.h: fix typo

* stm32_dac.c: set OUTEN bit for DAC1CH2 and DAC2CH1

* stm32_hrtim: cosmetic changes

* power/motor: direction parameter is now int8 + add overload fault

* libdsp: all floats with f-sufix

    libdsp: add precision option for library

    libdsp: add debug option for library and assertions in functions

    libdsp: add current samples correction for SVM3

    libds: add some motor control specific functions

    libdsp: add basic speed observer

    libdsp: fix phase shift in SMO observer

    libdsp: add more logic to FOC

    config/sim/dsptest: add dsptest configuration

* libdsp/lib_motor.c: remove unused comparation

* libdsp/lib_observer.c: update some comments

* libdsp/lib_motor.c: ouch, forgot to change variable name

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-07 18:17:42 +00:00
Mateusz Szafoni
8416d9a966 Merged in raiden00/nuttx (pull request #668)
Master

* libdsp: initial commit

* libdsp: cosmetics

* stm32f334-disco/buckboost: use a PID controller from libdsp

* stm32_adc.h: fix typo

* stm32_dac.c: set OUTEN bit for DAC1CH2 and DAC2CH1

* stm32_hrtim: cosmetic changes

* power/motor: direction parameter is now int8 + add overload fault

* libdsp: all floats with f-sufix

    libdsp: add precision option for library

    libdsp: add debug option for library and assertions in functions

    libdsp: add current samples correction for SVM3

    libds: add some motor control specific functions

    libdsp: add basic speed observer

    libdsp: fix phase shift in SMO observer

    libdsp: add more logic to FOC

    config/sim/dsptest: add dsptest configuration

* libdsp/lib_motor.c: remove unused comparation

* libdsp/lib_observer.c: update some comments

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-07 17:04:57 +00:00
Gregory Nutt
3cd1ccfa48 configs/viewtool-stm32f107/tcpblaster: Configuration modified to use the low-priority work queue. Actually ALL network configuration should be modified to use the low priority work queue. It is inappropriate to be performing network operations on the high priority work queue. 2018-07-07 09:23:02 -06:00
Gregory Nutt
427b3b8fcb Squashed commit of the following:
net/utils:  return from net_breaklock() was being clobbered.
    net/:  Replace all calls to iob_alloc() with calls to net_ioballoc() which will release the network lock, if necessary.
    net/utils, tcp, include/net:  Separate out the special IOB allocation logic and place it in its own function.  Prototype is available in a public header file where it can also be used by network drivers.
    net/utils: net_timedwait() now uses new net_breaklock() and net_restorelock().
2018-07-07 08:26:13 -06:00
Gregory Nutt
75cc19ebb4 net/tcp: Fix a deadlock condition that can occur when (1) all network logic runs on a single work queue, (1) TCP write buffering is enabled, and (2) we run out of IOBs. In this case, the TCP write buffering logic was blocking on iob_alloc() with the network locked. Since the network was locked, the device driver polls that would provide take the write buffer data and release the IOBs could not execute. This fixes the problem by unlocking the network lock while waiting for the IOBs. 2018-07-06 19:49:05 -06:00
Gregory Nutt
23a8af2069 Trivial update to some comments. 2018-07-06 17:37:26 -06:00
Gregory Nutt
6cb9f8001c Squashed commit of the following:
lpc17, sam34:  Rename some improperly scoped configuration variables; fix some duplicate configuration variable names.
    lpc11, lpc17, lc823450:  Rename some improperly scoped configuration variables; fix some duplicate configuration variable names.
    lpc11, lpc17, lpc43:  Rename some improperly scoped configuration variables; fix one duplicate configuration variable.
2018-07-06 09:15:57 -06:00
Gregory Nutt
5764d5a529 net/tcp: Back out part of commit d944388888. I see a few places that say that the maximum receive window size is 32,767 (INT16_MAX), but most say that it is 65,535 (UINT16_MAX). 2018-07-05 17:41:01 -06:00
Gregory Nutt
d944388888 configs/viewtool-stm32f107: Add a TCP performance test using apps/examples/tcpblaster. 2018-07-05 16:08:03 -06:00
Gregory Nutt
73c4b1610b net/tcp: Set the default TCP MSS to the value required by RFC 879 and never change it under any circumstance unless the remote host requests a larger MSS via an option the TCP header. 2018-07-05 10:54:45 -06:00
Ramtin Amin
f39c611d64 arch/arm/src/stm32f7/stm32_sdmmc.c: Add SDIO coard support. 2018-07-05 07:31:41 -06:00
Gregory Nutt
30657b769f net/udp/udp_setsockopt.c: Remove a warning about an uninitialized variable. 2018-07-04 18:28:17 -06:00
Gregory Nutt
e1f8b3ff3b Update some help comments in two Kconfig files. 2018-07-04 15:36:31 -06:00
Gregory Nutt
22cd0d47fa This commit attempts remove some long standard confusion in naming and some actual problems that result from the naming confusion. The basic problem is the standard MTU does not include the size of the Ethernet header. For clarity, I changed the naming of most things called MTU to PKTSIZE. For example, CONFIG_NET_ETH_MTU is now CONFIG_NET_ETH_PKTSIZE.
This makes the user interface a little hostile.  People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header).  A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length.  Instead, we define the packet buffer size then derive the MTU.

The MTU is not common currency in networking.  On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP).  Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes.  So we should be all good and without the recurring 14 byte error in MTU's and MSS's.

Squashed commit of the following:

    Trivial update to fix some spacing issues.
    net/: Rename several macros containing _MTU to _PKTSIZE.
    net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE.  This is not the MTU which does not include the size of the link layer header.  This is the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename the file d_mtu in the network driver structure to d_pktsize.  That value saved there is not the MTU.  The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header.  The MTU does not include the link layer header.
2018-07-04 14:10:40 -06:00
Gregory Nutt
daa3fcc781 include/nuttx/spi/spi.h: Add a definition for a USBHOST SPI device. drivers/usbhost/usbhost_max3421e.c: Review and correct SPI locking usage. 2018-07-04 08:55:43 -06:00
Frank Benkert
317c7c2aff arch/arm/src/samv7: Add ability for CAN BUS_OFF autorecovery according ISO11898-1:2015. With this change we added an ioctl for triggering the autorecovery sequence for BUS_OFF to the CAN-driver and the SAMV7 low-level driver. According the datasheet: If the device goes Bus_Off, it will set MCAN_CCCR.INIT of its own accord, stopping all bus activities. Once MCAN_CCCR.INIT has been cleared by the processor (application), the device will then wait for 129 occurrences of Bus Idle (129 * 11 consecutive recessive bits) before resuming normal operation. At the end of the Bus_Off recovery sequence, the Error Management Counters will be reset. During the waiting time after the resetting of MCAN_CCCR.INIT, each time a sequence of 11 recessive bits has been monitored, a Bit0 Error code is written to MCAN_PSR.LEC, enabling the processor to readily check up whether the CAN bus is stuck at dominant or continuously disturbed and to monitor the Bus_Off recovery sequence. MCAN_ECR.REC is used to count these sequences. 2018-07-04 07:48:59 -06:00
Gregory Nutt
254924029b net/udp: Restore some legacy behavior that was lost with the implementation of CONFIG_NET_UDP_BINDTODEVICE: If no device has a local address when the broadcast packet is sent and the UDP socket is not bound to a device, there select some arbitrary device. This is certainly lunacy in the case where there are multiple network devices registered because the wrong device will probably be returned. It works find, however, for the legacy case where only a single network device is registered. 2018-07-04 07:35:51 -06:00
Gregory Nutt
75f7663427 This commit adds support for the Maxim M3421E USB host driver.
Squashed commit of the following:

    drivers/usbhost/usbhost_max3421e.c:  Add USB tracing support.  Fix compilation errors when assertions and debug is enabled.
    drivers/usbhost/usbhost_max3421e.c:  Fixes to get a clean compilation.
    drivers/usbhost/usbhost_max3421e.c:  Drivers is basically code complete.
    drivers/usbhost/usbhost_max3421e.c:  Missed a little bit of logic in the last commit.
    drivers/usbhost/usbhost_max3421e.c:  Completes implementatin of control transfers.
    drivers/usbhost/usbhost_max3421e.c:  Implements low-level part of packet receive.
    drivers/usbhost/usbhost_max3421e.c:  Reorder some functions add a little more transfer-related logic.
    drivers/usbhost/usbhost_max3421e.c:  Completes basic logic path for sending normal packets.
    drivers/usbhost/usbhost_max3421e.c:  Correct handling of SNDFIFO double buffering.
    drivers/usbhost/usbhost_max3421e.c:  Not necessary to set the ACKSTAT bit in host mode.  Clean up some comments.
    drivers/usbhost/usbhost_max3421e.c:  Mostly cosmetic cleanup
    drivers/usbhost/usbhost_max3421e.c:  Revise some previous logic.  Looks like the MAX3421E can handle 16 channels in host mode.  A little bit of work on packet transfer logic.
    Copy paste error fix
    drivers/usbhost/usbhost_max3421e.c:  Add some channel allocation logic.
    drivers/usbhost/usbhost_max3421e.c:  Add some initialization logic.
    drivers/usbhost/usbhost_max3421e.c:  Add logic to determine if a full or low speed device has been connected.
    drivers/usbhost/usbhost_max3421e.c:  Add interrupt handling and bus reset logic.
    drivers/usbhost/usbhost_max3421e.c:  Add framework for an MAX3421E host driver.  Initial commit is just the STM32 OTGFS host driver with a few new SPI-related functions.
2018-07-03 18:49:51 -06:00
Masayuki Ishikawa
88f8a09a25 Merged in masayuki2009/nuttx.nuttx/lc823450_i2s_tx_threshold (pull request #667)
arch/arm/src/lc823450: Add tx start threshold to lc823450_i2s.c

In addition, lc823450_i2s_send() now accepts byte-aligned stream.

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-03 12:59:03 +00:00
Masayuki Ishikawa
f3bb2728d4 Merged in masayuki2009/nuttx.nuttx/update_lc823450_configs (pull request #666)
configs/lc823450-xgevk: Update defconfig files

To audio/bt/rndis/usb, add CONFIG_FAT_MAXFNAME=255

To audio/rndis/usb, add CONFIG_SYSTEM_TASKSET=y

To bt/rndis, add CONFIG_AUDIO_I2SCHAR=y, CONFIG_EXAMPLES_I2SLOOP=y,
CONFIG_NET_UDP_BINDTODEVICE=y

From bt, remove CONFIG_SYSLOG_TIMESTAMP=y,
CONFIG_SYSLOG_TIMESTAMP_REALTIME=y

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-03 12:58:05 +00:00
Marcin Wyrwas
898fdbded0 Merged in plwm/nuttx/stm32f746g-disco-sdram (pull request #665)
Add support for STM32F746G-disco board SDRAM

* add support for STM32F746G-disco board SDRAM

* changed fb config to use SDRAM and fixed compilation

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-02 23:49:55 +00:00
Alan Carvalho de Assis
8a1f3d6fa1 arch/arm/src/xmc4/xmc4_gpio.c: Add a specific bit encoding for openprain GPIO pin. 2018-07-02 10:56:58 -06:00
Gregory Nutt
f3229cc00a include/nuttx/usb/max3421e.h: Update MAX3421E header file. 2018-07-01 16:03:59 -06:00
Gregory Nutt
83d6c9b1b9 Update MAX3421E header file. 2018-07-01 13:03:53 -06:00
Gregory Nutt
3e9ba72441 net/sixlowpan: Fix typo uint16->uint16_t. Also picks up some cosmetic USB host changes. 2018-07-01 10:05:15 -06:00
Gregory Nutt
824f1dd3fe Squashed commit of the following:
lpc17:  Removed duplicate configuration variable definitions from Kconfig:  CONFIG_USBHOST_BULK_DISABLE, CONFIG_USBHOST_INT_DISABLE, and USBHOST_ISOC_DISABLE.  These are global USBHOST configurations and are all defined in drivers/usbhost/Kconfig.
    lpc17:  Correct scope of naming of configuration variables:  CONFIG_USBHOST_TDBUFFERS->CONFIG_LPC17_USBHOST_TDBUFFERS, CONFIG_USBHOST_TDBUFSIZE->CONFIG_LPC17_USBHOST_TDBUFSIZE, and CONFIG_USBHOST_IOBUFSIZE->CONFIG_LPC17_USBHOST_IOBUFSIZE
    lpc17:  Correct scope of naming of configuration variables:  CONFIG_USBHOST_NEDS->CONFIG_LPC17_USBHOST_NEDS and CONFIG_USBHOST_NTDS->CONFIG_LPC17_USBHOST_NTDS
    lpc17:  Correct scope of naming of configuration variable:  CONFIG_USBHOST_OHCIRAM_SIZE->CONFIG_LPC17_OHCIRAM_SIZE
2018-07-01 08:38:05 -06:00
Gregory Nutt
e59b26370d Squashed commit of the following:
Fix a few typo/compilation problems.
    net/:  Remove all CONFIG_NET_xxx_TCP_RECVWNDO configuration variables.  They were used only to initialize the d_recwndo of the network device structure which no longer exists.
    net/:  Remove the device TCP receive window field (d_recvwndo) from the device structure.  That value is no longer retained, but is calculated dynamically.
    Remove some dangling references to CONFIG_NET_TCP_RWND_CONTROL.
    net/tcp:  Take read-ahead throttling into account when calculating the TCP receive window size.
    net/tcp: tcp_get_recvwindow() now returns the receive window size directly (vs. indirectly via the device structure).
    net/tcp:  Remove CONFIG_NET_TCP_RWND_CONTROL.  TCP window algorithm is now trigged only by CONFIG_NET_TCP_READAHEAD.
2018-07-01 07:59:33 -06:00
Gregory Nutt
6ec8f9ce83 include/nuttx/usb: Add header file for the MAX3421E. 2018-07-01 07:09:36 -06:00
Gregory Nutt
b32d8b1714 net/tcp and sixlowpan: Separate the the TCP receive window calculations to a separate header file. It must also be used by the special 6LoWPAN TCP logic. 2018-06-30 20:50:07 -06:00
Gregory Nutt
d52b65b06d Fix several configuration varaibles that were defined in multiple Kconfig files and/or lacked any scoping and the naming.
Squashed commit of the following:

    lpc17, pic32mx, pic32mz:  Fix duplicated, improperly scoped configuration variable names:  CONFIG_PHY_SPEED100 and CONFIG_PHY_AUTONEG.
    lpc17, pic32mx, pic32mz:  Fix another duplicated configuration variable name:  CONFIG_PHY_FDUPLEX.
    lpc17:  Fix naming scope: CONFIG_NET_HASH -> CONFIG_LPC17_ETH_HASH.
    lpc17:  Fix naming scope: CONFIG_NET_WOL -> CONFIG_LPC17_ETH_WOL.
    lpc17, pic32mx, pic32mz:  Fix naming scope: CONFIG_NET_ -> CONFIG_LPC17_ETH_PRIORITY.
    lpc17, pic32mx, pic32mz:  Fix another duplicated configuration variable name:  CONFIG_NET_NTXDESC and CONFIG_NET_NRXDESC.
    lpc17:  Fix naming scope: CONFIG_NET_EMACRAM_SIZE -> CONFIG_LPC17_EMACRAM_SIZE.
2018-06-30 11:55:41 -06:00