Commit Graph
10 Commits
Author SHA1 Message Date
Olivier 00a4deddd6 Teensy: Update hwCPUVoltage() (#853) 2017-05-21 16:12:36 +02:00
Olivier abba1ec377 Minor updates STM32F1 support (#851) 2017-05-21 14:20:07 +02:00
d00616 6c12dddf5a Enhance randomness (AVR, ESP8266, Linux, NRF5) (#845)
This commit changes the way random numbers are available
with MySensors.

The AVR platform uses a 32 Bit random seed build from a floating
analog pin. The way of the generation of this seed is FIPS 140-2
compliant.

For support MCU with a fast way to generate random data, the
hwGetentropy() command is now available to allow rapid generation
of random data.

The ESP8266 platform uses the internal random source for randomness
for hwGetentropy() and Arduino's random() function.

The NRF5 platform initializes the pseudo random number generator
from internal hardware number generator. The internal AES-ECB unit
generates random data after filling with HWRNG data by AES-CBC.

On Linux getrandom() is implemented via syscall().

signerAtsha204SoftGetNonce speed:
AVR = ~14000us (sha204Soft)
NRF51 = ~152us (AES-CBC), 1739us (old sha204Soft)
NRF52 = ~31us (AES-CBC), 183us (old sha204Soft)
ESP8266 = ~20us (RANDOM_REG32), 380us (old sha204Soft)

All Nonce results tested for FIPS 140-2 compliance successfully.
2017-05-21 14:12:09 +02:00
Olivier b479a0cf3f Support for Teensy3 boards (#850) 2017-05-21 08:43:26 +02:00
Olivier e041bf4d74 NRF5: Updates for Jenkins verifier (#852) 2017-05-21 08:41:11 +02:00
d00616 726a20dad9 Add nrf5 platform (#830)
* Add NVRAM support

This is an EEPROM replacement based on MCU's internal Flash memory.
The NVRAM class is designed to be stateless. Each operation is
written to flash immediately.

The last 16k(nRF51)/32k(nRF52) of Flash memory are managed by the
VirtualPage class.  This class allows writing a single emulated 4k
page up 40,000 times.

The NVRAM class is a log based byte-wise storage allowing up to
40,000,000 writes depending on the number of used addresses.  Each
four allocated addresses from the beginning of the NVRAM reduce the
write log by one.

When first 256 bytes of the emulated storage are used, there is an
average writing capacity of 145,000 cycles per byte.

When the write log is full, the NVRAM is compressed into a new flash
page. After a new page is ready, the old page is released. This
process can take up to 4500 ms and cannot be interrupted.

The NVRAM functionality can easily be ported to ESP8266 or SAMD by
providing a Flash interface.

* Add NRF5 platform support

This is the support of the Nordic Semiconductor NRF51 (nrf51822,
nrf51422) and NRF52 (nrf52832) platform. Based on arduino-nRF5
(https://github.com/sandeepmistry/arduino-nRF5).

The included radio driver is compatible with the NRF24 devices.
Using a SoftDevice (BLE)is not supported and must be removed before
flashing MySensors with a "mass_erase" operation.
2017-05-14 11:53:01 +02:00
Marcelo Aquino 66ff5b2880 Linux: Add support for RFM69 (#823) 2017-04-19 22:40:21 +02:00
Olivier 26c237adad Restructure HAL files (arch) (#820) 2017-04-17 20:33:08 +02:00
Olivier 818f887926 Polishing code (#803) 2017-04-02 20:03:59 +02:00
Olivier b132a8a81e Transport update (#722)
* Major transport rework

* Adjust signal report calculations

* Minor driver optimizations

* Implement sanity check in legacy RFM69 driver

* Additional RFM69 rework

* RFM95 encryption

* Polishing
2017-03-28 20:31:08 +02:00