Commit Graph

633 Commits

Author SHA1 Message Date
Ciaran Woodward 267a3b3e29 [cli] add 'childip' command to cli for getting ip addresses of MTD children (#3791) 2019-04-30 18:40:40 -07:00
Yakun Xu 617f8958dd [mesh-forwarder] verify data request is ack with fp=1 (#3785) 2019-04-30 18:37:48 -07:00
Joseph Newman 988be2a7f6 [efr32] further UART driver refactoring (#3776)
- No  longer  queue  2x  32-byte  buffers  for   UART  receive.  Upon
  investigation, the  RAIL library switches these  buffers in software
  (within the  same ISR context as  `receiveDone`), so it  seems to be
  pointless  from  a   performance  perspective  in  queuing  multiple
  buffers. Instead, now work with 64-byte buffers.

- Refactored `updateReceiveProgress` so that extra variable
  `mLastCount` isn't required.

- Extensive testing at higher baud rates revealed race conditions and
  some issues with detecting buffer full conditions.

- Added comments to clarify the logic

- Removed asserts after returning from RAIL library
  functions. Contrary to my previous arguments, if the behaviour of
  the RAIL library functions changes in the future (with regards to
  the errors it returns), then somebody would have to remember to
  check these asserts were still appropriate.
2019-04-26 08:41:52 -07:00
Jonathan Hui f46fbb844d [pskc] switch to using otPSKc struct (#3769) 2019-04-18 08:45:14 -07:00
Joseph Newman 02463bdda1 [efr32] improve USART driver error handling (#3745)
* efr32 uart dma changes
* correct handling of queue full
2019-04-16 09:40:01 -07:00
Kamil Sroka 9fa48b54a8 [nrf528xx] don't return OT_ERROR_FAILED from otPlatRadioTransmit (#3757) 2019-04-16 08:22:29 -07:00
Łukasz Duda 62b35b67c3 [nrf52840] update README.md after SDK release (#3759) 2019-04-15 08:38:18 -07:00
Łukasz Duda d3fdf84ee0 [platform] return error on incorrect otPlatRadioDisable usage (#3756) 2019-04-15 08:36:47 -07:00
Joseph Newman 5d2e6cd0d9 [efr32] take advantage of DMA for efr32 USART receive (#3730) 2019-04-08 10:39:45 -07:00
ozanoner 37a662197f [coap] remove otCoapMessage from CoapSecure::DefaultHandler() (#3737) 2019-04-06 21:54:07 -07:00
Yakun Xu 33b903bc62 [posix-app] fix conversion warnings (#3738)
This commit fixes conversion warnings and also adjusts one travis test to
check these kind of issues.
2019-04-06 21:40:54 -07:00
Yuzhuo Yang c02a985609 [diag] use OT_ARRAY_LENGTH to unify code and shrink image size (#3677) 2019-04-03 21:52:07 -07:00
Jiacheng Guo 88912d23ae [nrf52840] signal event in usb cdc (#3715) 2019-04-01 09:05:10 -07:00
dismirlian 81fd8a8b10 [examples] software implementation of source match table (#3717)
* [examples] add software implementation of source match table

* [efr32] modify radio driver to use generic implementation of source match table

* [efr32] configure soft source match table PAN ID
2019-04-01 08:52:47 -07:00
Łukasz Duda 0b6cd5b115 [nrf528xx] add otSysEventSignalPending call in spi-slave driver (#3716) 2019-03-27 08:47:13 -07:00
dismirlian 24d5d3db66 [efr32] minor enhancements to radio driver (#3713)
* Add static linkage to local functions

* Simplify clearing checksum of source match table entry
2019-03-26 08:53:10 -07:00
Jonathan Hui 8ed382207d [efr32] fix build issues when sub-GHz support is not configured (#3704) 2019-03-22 08:11:56 -07:00
Jonathan Hui aaaae937d3 [style] prefer OT_UNUSED_VARIABLE (#3696) 2019-03-19 21:17:33 -07:00
Zhanglong Xia 1af2933449 [efr32] enable BRD4170A to support 915MHz and 2.4GHz by default (#3664) 2019-03-14 09:44:35 -07:00
Zhanglong Xia ce24abb7bb [api] rename ChannelMaskPage0 to ChannelMask (#3665) 2019-03-13 07:49:25 -07:00
Kamil Sroka a99816a225 [nrf52811] add emulation on nRF52840 to README.md (#3682) 2019-03-12 23:27:42 -07:00
Łukasz Duda 039aab3fa0 [nrf52840] handle NRF_ERROR_BUSY from SD in flash driver (#3680) 2019-03-12 23:27:16 -07:00
RaKu 6453c9f033 [nrf52840] do not specify interface protocol in USB CDC (#3658)
bInterfaceProtocol descriptor previously indicated that AT V.250 commands
were supported by the device. This could cause issues with applications
managing modems.
2019-03-08 08:28:26 -08:00
Zhanglong Xia 96725a985e [phy] add support for OQPSK modulation in 915MHz band (#3378) 2019-03-08 08:09:55 -08:00
Yakun Xu 4acd8b7aab [build] fix SLAAC switch (#3645) 2019-03-05 10:45:22 -08:00
Jiacheng Guo ab12b47182 [posix] do not exit on EINTR in UART (#3643) 2019-03-04 08:38:28 -08:00
Yakun Xu 6705fe83f3 [time-sync] fix time sync and typo (#3637)
* fix typo in common-switches
* fix segment fault with time sync enabled
2019-02-28 10:28:16 -08:00
Stuart Longland 74ad300556 [cc2538] fix RSSI calibration when CC2592 is in use (#3636)
* Define parameter for RSSI offset.

This defines the RSSI offset as an overridable parameter in the CC2538
configuration for users that have installed a CC2592 on their board but
have hard-wired the HGM pin either to `VDD` or `GND`.

* Calibrate RSSI according to HGM state.

I had actually misread the datasheet a little bit, having gotten
sensitivity and RSSI offset confused.  The values I needed for the
sensitivity were actually in the table *above* where I got the original
figures here from.

This puts the *correct* figures in place, and also defines a function
that returns the RSSI offset based on the state of the HGM pin (or
returns a static value if we omit CC2592 support or disable HGM
control).

* Expose RSSI offset setting in Makefile

* Document RSSI offset parameter
2019-02-28 08:18:56 -08:00
Łukasz Duda db945a5278 [nrf528xx] update platforms README.md (#3633) 2019-02-28 08:17:00 -08:00
Piotr Szkotak 096632a475 [nrf528xx] add radio and random platform fixes (#3634)
* [nrf52811] add radio and random platform fixes

* [nrf528xx] handle all radio driver rx/tx errors
2019-02-27 12:41:41 -08:00
Joseph Newman f9884b8afc [efr32] implement otPlatRadioEnergyScan API (#3631)
* refactor for energy scan API

* rename enum, init status in init func, tidy up and fix issue in GetRssi

* add cast and fix start energy scan error return
2019-02-27 12:03:51 -08:00
Joseph Newman 02d33b9bb9 [efr32] fix cannot compile with log output OPENTHREAD_CONFIG_LOG_OUTPUT_APP (#3625) 2019-02-25 09:27:37 -08:00
Jonathan Hui 5cf3540f6e [efr32] unify flash config around SETTINGS_CONFIG_PAGE_NUM (#3620) 2019-02-25 09:26:26 -08:00
Stuart Longland fd2503e792 [cc2538] add support for CC2538-CC2592-EM (#3609)
* [cc2538] Define registers for control of CC2592.

In order to set up the signals needed to drive the CC2592 front-end, we
need to expose a few registers in the radio module that route internal
module signals to pins on Port C.

TI also recommend hooking the HGM pin of the CC2592 to a GPIO pin so
that the high-gain mode can be software-controlled.  It can be connected
to any GPIO pin, but they call out PD2 specifically for this, so we need
to configure GPIO port C & D.  Since we're here, we'll add B as well.

Some macros of convenience are also added for accessing the Nth element
in an array of 32-bit registers, as well as computing the bit mask of
the Nth GPIO pin.

* [cc2538] Define configuration settings for CC2592.

By default, we disable support for the CC2592 as we do not wish to break
existing OpenThread instances.  The configuration parameters allow
customisation of the locations for the `PA_EN`, `LNA_EN` and `HGM`
signals (within the constraints of the CC2538) for cases where people
have moved the signals around on custom boards.

The defaults work with designs derived off the CC2538-CC2592 EM
reference design.

* [cc2538] Define control interface for HGM pin.

Since the `HGM` signal is under software control, we need to be able to
allow the software to turn it on or off as required.  This exposes two
functions, one of which queries the current state (by looking at the
GPIO register bit-mask), and the other provides a means to change the
state.

* [cc2538] Implement control and calibration of the CC2592.

This implements the control functions defined earlier and adds the
necessary logic for initialising the CC2592.

The transmit and receive power levels are also calibrated.

* [cc2538] Define CC2592 options in Makefile.

This allows building of a CC2538-CC2592 EM image by specifying
`CC2592=1` on the command line.
2019-02-22 08:59:19 -08:00
Martin Turon 0f2502833e [nrf52840] add nrfjprog target for flashing (#3478) 2019-02-19 20:46:02 -08:00
Marven Gilhespie 18c496d915 [efr32] update to Silicon Labs Flex SDK v2.5 (#3596) 2019-02-19 12:09:49 -08:00
Łukasz Duda 8c13df5a51 [cli] add command to retrieve mle counters (#3605) 2019-02-19 11:37:45 -08:00
Piotr Szkotak 697aa0259c [nrf52811] fix uart hwfc define in the platform config (#3606) 2019-02-19 08:54:57 -08:00
Piotr Szkotak 80c98ac824 [nrf528xx] update radio driver to version 1.3.0 (#3603) 2019-02-19 08:44:49 -08:00
Łukasz Duda 968f9b6898 [nrf528xx] improve flash API (#3602) 2019-02-18 11:11:13 -08:00
Łukasz Duda 62d5be594d [nrf528xx] improve platform specific configs (#3595) 2019-02-15 09:34:28 -08:00
RaKu 905f8c7153 [nrf528xx] always enable diag module (#3593)
Disabling diag module causes linker errors due to unresolved symbols when building NCP example with NCP_SPI flag set to 1 on some toolchains.
2019-02-15 09:22:14 -08:00
Abtin Keshavarzian 7a69ae36a1 [slaac] add config option to enable/disable SLAAC support (#3512)
This commit adds `OPENTHREAD_CONFIG_ENABLE_SLAAC` as a build
configuration option to enable/disable SLAAC support within
OpenThread. This feature is disabled by default. This commit also
adds `SLAAC` to `common-switches` list to allow builds to enable
this feature easily.
2019-02-13 18:17:18 -08:00
Jonathan Hui 8a037c8aa5 [travis] add build checks for qpg6095 platform (#3567) 2019-02-08 08:41:47 -08:00
Łukasz Duda 070fd834e8 [nrf52811] add support for nRF52811 platform (#3566) 2019-02-08 08:41:22 -08:00
RaKu bfe0c492d9 [nrf52840] disable compilation of unused transports (#3561)
Add DISABLE_TRANSPORTS switch which disables build of all transports and examples using them.
Disable compilation of USB and UART transports if NCP_SPI switch is set. This also disables
the build of CLI example.
2019-02-07 08:42:27 -08:00
Abtin Keshavarzian 29d637683f [settings-flash] ensure SETTINGS_CONFIG_PAGE_NUM >=2 (#3416)
This commit adds code to ensure `SETTINGS_CONFIG_PAGE_NUM` is at
least two. This helps simplify the code and also address
Coverity warnings for unreachable code.
2019-02-04 20:46:23 -08:00
Oleksandr Grytsov c31ab99080 [samr21] Define SETTINGS_CONFIG_PAGE_NAME with const (#3491)
Currently SETTINGS_CONFIG_PAGE_NAME is defined indirectly by addresses of
__d_nv_mem_start and __d_nv_mem_end. But such definition doesn't allow to
perform compile time sanity check. Define this macro with const value 16.

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00
Oleksandr Grytsov e7a6bde56d [samr21] Implement otPlatLog for SAMR21 XPLAINED PRO board (#3491)
Use EDBG DGI SPI interface to put log.

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00
Oleksandr Grytsov 513b0f8b8d [samr21] Pass ack frame to otPlatRadioTxDone (#3491)
SAMR21 RF doesn't provide ACK frame payload. Create it manually and pass to
otPlatRadioTxDone.

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00