Go to file
Mikhail Isaev 352e6fbd23 Fix overflow at extremely low RSSI
Some LoRaWAN modem like SX1272 can receive downlink packets with RSSI level less than -127. So "int8_t" is not enough for store all possible RSSI values. For example, SX1272 has sensitivity at -137 dBm.
Problem was manifested in the file "SX1272_LoRaRadio.cpp" at SX1272_LoRaRadio::handle_dio0_irq() method.
When value of _rf_settings.lora_packet_handler.rssi_value calculated incorrect RSSI will be stored. Example case:

Value readen from register REG_LR_PKTSNRVALUE _rf_settings.lora_packet_handler.snr_value equals -47.
Value readen from register REG_LR_PKTRSSIVALUE equals 17.
RSSI_OFFSET equals "-139", snr equals "-11".

For case MODEM_LORA value calculated by formula:
_rf_settings.lora_packet_handler.rssi_value = RSSI_OFFSET + rssi + (rssi >> 4) + snr;
and result value will be "124" because of int8_t overflow so it's not correct value (too high).

Correct value must be:
-139 + 17 + (1) + (-11) = -132.

Another motivation: at all other places int16_t type used to store RSSI value.
2021-11-24 21:56:42 +03:00
.github Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
TESTS Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
UNITTESTS Change google test git tag to main 2021-11-16 10:35:49 +01:00
cmsis Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
connectivity Fix overflow at extremely low RSSI 2021-11-24 21:56:42 +03:00
docker_images/mbed-os-env set locale in mbed-os-env docker image 2021-09-08 13:19:17 +01:00
docs Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
drivers InterruptIn: add note about enabling interrupts in rise/fall 2021-10-21 14:55:37 +01:00
events Revert "Merge branch 'fix-memmap-diff'" 2021-10-05 17:17:35 +02:00
extern Add external greentea-client dependency 2021-07-07 14:29:14 +01:00
features Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
hal Revert "Merge branch 'fix-memmap-diff'" 2021-10-05 17:17:35 +02:00
platform Update Mbed version block 2021-11-22 16:23:38 +00:00
rtos Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
storage QSPIF: Add missing mbed namespace prefix to header file 2021-10-19 15:09:34 +02:00
targets Merge pull request #15174 from OpenNuvoton/nuvoton_m2354_tfm_sram-bank_sector-map_scratch 2021-11-22 10:48:21 +00:00
tools Merge pull request #15126 from multiplemonomials/create-distro-reborn 2021-10-19 14:28:06 +02:00
.astylerc Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
.codecheckignore .codecheckignore add STM mx_wifi files 2021-09-30 17:56:07 +02:00
.coveragerc Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
.editorconfig Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
.gitattributes Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
.gitignore Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
.lgtm.yml Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
.mergify.yml mergify: fix needs work labels 2021-10-14 15:01:16 +01:00
.pylintrc Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
CMakeLists.txt Revert "update cmake_minimum_required to 3.21.0" 2021-10-05 17:16:59 +02:00
CONTRIBUTING.md Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
DOXYGEN_FRONTPAGE.md Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
Jenkinsfile Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
LICENSE-apache-2.0.txt Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
LICENSE.md Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
README.md Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
doxyfile_options Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
doxygen_options.json Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
logo.png Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
mbed.h Squashed 'connectivity/nanostack/coap-service/' changes from bbe01736bd..9a9085d4cd 2021-09-23 13:21:08 +03:00
requirements.txt Update PyElfTools as well 2021-10-22 14:59:10 +02:00

README.md

Mbed OS

Build status master Tools coverage status

Arm Mbed OS is an open source embedded operating system designed specifically for the "things" in the Internet of Things. It includes all the features you need to develop a connected product based on an Arm Cortex-M microcontroller, including security, connectivity, an RTOS and drivers for sensors and I/O devices.

Mbed OS provides a platform that includes:

  • Security foundations.
  • Cloud management services.
  • Drivers for sensors, I/O devices and connectivity.

Release notes

The release notes detail the current release. You can also find information about previous versions.

License and contributions

The software is provided under the Apache-2.0 license. Contributions to this project are accepted under the same license. Please see contributing.md for more information.

This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide.

Folders containing files under different permissive license than Apache 2.0 are listed in the LICENSE file.

Getting started for developers

We have a developer website for asking questions, engaging with others, finding information on boards and components, using an online IDE and compiler, reading the documentation and learning about what's new and what's coming next in Mbed OS.

Getting started for contributors

We also have a contributing and publishing guide that covers licensing, contributor agreements and style guidelines.

Documentation

For more information about Mbed OS, please see our published documentation. It includes Doxygen for our APIs, step-by-step tutorials, porting information and background reference materials about our architecture and tools.

To contribute to this documentation, please see the mbed-os-5-docs repository.