Commit Graph

30648 Commits

Author SHA1 Message Date
Masayuki Ishikawa bac67455b6 ICMPv6: Support source link-layer address option in RA 2017-08-08 16:42:34 +09:00
Gregory Nutt d5c91f9a57 C Coding Standard: Clarify the form of structures and unions declared with local variable definition. 2017-08-07 16:28:10 -06:00
Gregory Nutt 6e3ced4111 Spirit: Make error handling for discarded packets match other RX failure interrupts. 2017-08-07 13:52:42 -06:00
Gregory Nutt 835ae2999d networking: Move a little more to the inet/ subdirectory. 2017-08-07 13:03:23 -06:00
Gregory Nutt 2ada7d5892 IPv6: Remove comparisons to the address with all ones set. IPv6 does not support broadcast addresses and certainly not in that form. Replace with multicast addresses beginning with 0xff02. 2017-08-07 11:50:50 -06:00
Stefan Kolb 22dfa875fc I discovered while working on the SAMV7 mcan driver that the implementation of the CAN error handling is suboptimal. In the current implementation the following errors are implemented as pending errors:
* Receiving
  * MCAN_INT_STE (Stuff Error)
    More than 5 equal bits in a sequence occurred.
  * MCAN_INT_CRCE (CRC Error)
    Received CRC did not match the calculated CRC.
  * MCAN_INT_RF0L (Receive FIFO 0 Message Lost)
    Receive FIFO 0 message lost, also set after write attempt to Receive FIFO 0 of size zero.
  * MCAN_INT_RF1L (Receive FIFO 1 Message Lost)
    Receive FIFO 1 message lost, also set after write attempt to Receive FIFO 1 of size zero.

* Sending
  * MCAN_INT_BE (Bit Error)
    Device wanted to send a rec / dom level, but monitored bus level was dominant / recessive.
  * MCAN_INT_TEFL (Tx Event FIFO Element Lost)
    Tx Event FIFO element lost, also set after write attempt to Tx Event FIFO of size zero.

* General
  * MCAN_INT_MRAF (Message RAM Access Failure)
    The flag is set, when the Rx Handler
    * has not completed acceptance filtering or storage of an accepted message until the arbitration field of the following message has been received. In this case acceptance filtering or message storage is aborted and the Rx Handler starts processing of the following message.
    * was not able to write a message to the Message RAM. In this case message storage is aborted. In both cases the FIFO put index is not updated resp. the New Data flag for a dedicated Receive Buffer is not set, a partly stored message is overwritten when the next message is stored to this location. The flag is also set when the Tx Handler was not able to read a message from the Message RAM in time. In this case message transmission is aborted. In case of a Tx Handler access failure the MCAN is switched into Restricted Operation mode (see Section 47.5.1.5). To leave Restricted Operation mode, the processor has to reset MCAN_CCCR.ASM.
  * MCAN_INT_ELO (Error Logging Overflow)
    Overflow of CAN Error Logging Counter occurred.

The listed errors are not pending, the errors occurred and are gone directly afterwards. This commit changes the described behavior and simplifies the handling of CAN errors.
2017-08-07 10:31:04 -06:00
Jeff 4cbde22992 I'm working on bringing up USB full-speed support on STM32F405.  My board does not include a USB power switch, VBus sensing, over current detection, or ID pin.
This commit add a config STM32_OTGFS_VBUS_ CONTROL which lets us selectively disable VBus sensing and control.  I also sneaked in a change to disable the configgpio call for the ID pin, which is only used in OTG mode which isn't supported yet.  The only pins that need to be initialized should be OTGFS_DP and OTGFS_DM.

These changes let a USB mouse enumerate on my platform if it's plugged in on power-up.  Plugging, unplugging, clicking, or moving the mouse cause NSH to stop responding.  Because I'm using the ramlog, I don't have useful debug messaging yet, so there's a lot more work I have to do to troubleshoot it or get my JTAG debugging set up, but these patches shouldn't hurt anything.  I'm hoping my issue is something simple I overlooked in configuration.

I'm planning to add similar changes for the OTGHS peripheral (using integrated full speed phy) but I still need to test those changes before submitting patches.
2017-08-07 10:24:31 -06:00
Gregory Nutt 1ac4848686 Spirit bugfixes: Was hanging occasionally because there was not mechanism to restart the poll timer if poll was not performed because Spirit ws busy. Fixed by not checking if Spirit is busy. The TX poll can be performed asynchronouly while spirit is busy; any outgoing data will queued until Spirit is ready. Fixed handling of a timeout condition. Failure to transmition to the TX state would fail (timeout) if in a race condition Spirit already committed to the RX state. The driver needs to recover the state properly and avoid debug assertions in this event. 2017-08-07 09:22:16 -06:00
Gregory Nutt baf4c0d011 Minor change to last PR: errno should not be modified if no error occurred. 2017-08-07 06:33:53 -06:00
Masayuki Ishikawa 1dfed49a3c Merged in masayuki2009/nuttx.nuttx/smp_test (pull request #451)
sched/: Fix return value in sched_setaffinity()

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-08-07 09:24:09 +00:00
Masayuki Ishikawa 4530a72379 sched/: Fix return value in sched_setaffinity() 2017-08-07 15:00:31 +09:00
Gregory Nutt e57a5755cc TX timeout must also be cancelled on a TX error. TX timeout should check if we are waiting for a TXto complete. TX timeout was too short (short than the maximum number of retries). 2017-08-06 16:56:02 -06:00
Gregory Nutt bbf1ad4ea6 Spirit network driver: TX timeout was never being cancelled! Also reviewed and cleaned up all error handling logic 2017-08-06 15:40:37 -06:00
Gregory Nutt 3c6981534f Networking: Move INET socket interface out of net/sockets to its own directory net/inet 2017-08-06 14:48:19 -06:00
Gregory Nutt 48a507c0b7 6LoWPAN: When obtaining the radio MAC address from the IP address, handle the special case of broadcast and multicast address. 2017-08-06 13:50:48 -06:00
Alan Carvalho de Assis cb44833599 STM32F103-Minimum: (1) Enable CONFIG_MTD_PARTITION in Kconfig if flash partition is enabled and (2) Update the README.txt file with info needed to get SmartFS working. 2017-08-06 12:14:29 -06:00
Gregory Nutt 91cfe6c9be Spirit radio: Dropping packet size to 94 seems to fix problem with CRC failures. 2017-08-06 12:02:55 -06:00
Simon Piriou 38569d50fb b-l475e-iot01a: add basic support for external Macronix QuadSPI flash memory 2017-08-06 10:52:12 -06:00
Simon Piriou b1f50490bd MTD: Add driver for Macronix QuadSPI flash memory 2017-08-06 10:51:17 -06:00
Alan Carvalho de Assis 0a4650d1ee STM32F103-Minimum: Add support for SmartFS on Winbond W25 SPI NOR Flash 2017-08-06 10:38:55 -06:00
Gregory Nutt 9a53a2f64a Spirit: Restore the 96 byte maximum packet length. Reducing the packet length had no effect on eliminating RX FIFO errors. 2017-08-06 10:31:50 -06:00
Gregory Nutt 84001f79a0 Spirit Network Driver: Add support for watermark interrupts on RX FIFO. Reduce max packet length to avoid an errata. 2017-08-06 10:10:55 -06:00
Gregory Nutt 3b1e2ac4fd Spirit network driver: Restructure threading to reduce locking. Still get a few RX FIFO errors. 2017-08-06 08:26:51 -06:00
Ivan Ucherdzhiev aac877a268 STM32F746-Disco: Add ADC3 support. 2017-08-05 12:54:42 -06:00
Gregory Nutt 4c1a8170de Update README. 2017-08-05 12:48:07 -06:00
Gregory Nutt 2947ca06c9 Avoid some harsh, inappropriate DEBUGASSERT's. 2017-08-05 12:32:31 -06:00
Gregory Nutt 7ed665833f IEEE 802.15.4 network drivr: Fix more compile issues that only show up when CONFIG_NET_STARPOINT is defined. 2017-08-05 10:18:34 -06:00
Gregory Nutt 75ffb5b0e6 IEEE 802.15.4 network driver: Fix some errors introduced in previous commit. Clean up some of the casting logic. 2017-08-05 10:09:09 -06:00
Gregory Nutt 183ed7a206 6LoWPAN: Fix some typos introduced in previous commit. 2017-08-05 09:26:48 -06:00
Gregory Nutt a29a168086 Spirit + 6LoWPAN: In STAR configuration, Spirit must use a configured well known hub address. 6LoWPAN cannot assume that the PAN coordinator is the STAR hub; it must ask the radio to provide it with the address of the star hub 2017-08-05 09:13:29 -06:00
Gregory Nutt c2fbef2062 b-l475e-iot01a: Add configurations to support a star topology. 2017-08-05 07:53:55 -06:00
Gregory Nutt c07daace32 B-L475E-IOT01A: Make spirit-6lowpan configuration match what is currently under test: Enable multicast, broadcast, but disable CRC support. Currently CRCs are not working right. 2017-08-04 15:26:04 -06:00
Gregory Nutt 5d96385c52 Spirit: Increase number of retries if there is no acknowledgement; Add interrupt handling for the case where the max number of retries expires. Fix some badly implemented queue management code. With these changes the basic UDP and TCP tests work. 2017-08-04 15:20:10 -06:00
Gregory Nutt 8027d1bf18 Spirit: Enable AutoACK, TX retries, and RX timeouts in the network driver. 2017-08-04 13:16:07 -06:00
Jeff 25e4fb2886 tools/mkdeps.c: Eliminate a warning. MAX_PATH may already be defined in included system files. 2017-08-04 12:25:38 -06:00
Gregory Nutt 44c59f7533 Update a README 2017-08-04 12:19:59 -06:00
Gregory Nutt 0d551cd0ac Spirit: Convert network driver to use STack packets vs. Basic packets. We need to use the STack packets in order to provide the source address. 2017-08-04 12:19:59 -06:00
Gregory Nutt df51b69895 Spirit: Commit some trivial changes in preparation for a more substantial change. 2017-08-04 12:19:59 -06:00
Gregory Nutt 733d96cf81 Spirit: Correct setting of the length width field; Add multicast and broadcast addresses to radio properities. 2017-08-04 12:19:59 -06:00
Gregory Nutt f6ebcc2220 Spirit network driver: Need to enable sending of TX address. Moved some non-optional settings out of board.h to driver. 2017-08-04 12:19:58 -06:00
Gregory Nutt e8738e1f55 Minor update to some comments. 2017-08-04 09:00:58 -06:00
Gregory Nutt bbc06dcd8e RAMTRON: Should be able to select chunked write mode via a configuration option, not by editing the file. 2017-08-04 08:49:07 -06:00
Boris Astardzhiev 79ee0a5209 RAMTRON: Add support for splitting block writes in chunks. Some Re-RAMs like MB85AS4MT has a write buffer size limitation. 2017-08-04 08:12:59 -06:00
Jussi Kivilinna 9fc5f44ef6 syslog: CONFIG_CLOCK_MONOTONIC 2017-08-04 08:02:52 -06:00
Juha Niskanen 0113b0db95 drivers: handle I2C_TRANSFER return value consistently. Some I2C peripherals transfers return zero on success, others number of completed transfers. Make drivers robust against this. 2017-08-04 07:31:36 -06:00
Gregory Nutt 4cc13f8d94 Simulator: x86 stack needs to be aligned to 16-byte boundaries. 2017-08-04 07:03:39 -06:00
Gregory Nutt 36e7a18181 spirit: Modify reg needs to toggle CS to get the correct status. Remove some delbug left in last commit. make sprit_unlock an inline function. 2017-08-03 15:15:15 -06:00
Gregory Nutt d2b5078e01 Spirit: Mostly cosmetic fixes to names and comments. Tx timeout should run on the HP work queue. 2017-08-03 11:47:38 -06:00
Gregory Nutt 76c9ef4844 Spirit: Fix a few RX-related issues. 2017-08-03 11:08:33 -06:00
Jussi Kivilinna 81b5118727 mm_mallinfo: do heap end debug assert check with heap semaphore held 2017-08-03 10:01:26 -06:00