Skip to content

Nrf52 merge #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 993 commits into from
Oct 26, 2017
Merged

Nrf52 merge #369

merged 993 commits into from
Oct 26, 2017

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Oct 25, 2017

First step for #291

glennrub and others added 30 commits May 25, 2017 22:16
…nrf52/s132 bluetooth stack. Maturity of the module is pretty OK now.
…s a bug in transfer of bytes due to casting errors. The update removes the pyb_spi_obj_t wrapper going directly on the machine_hard_spi_obj_t as base for machine SPI objects. SDCard mounting is also tested.
…orward compatible with upstream master. Legacy high() and low() methods are kept.
…cting typo and adding SD card wireing documentation for direct SPI connection.
…ed in the seeed_tft.py ILI9341 driver for driving the display.
…y to do client write with response. Blocking call.
… an additional keyword, 'with_response'. Default value is False. Only activated in central role.
…all to bluetooth stack write function is done, to make sure that its not overwritten after reception of the write event in case of with_response writes.
…HAL driver. To make api's symetric. Also updating modules/rtc to get aligned with new HAL api.
…s.c used by BLE 6lowpan network which has been removed for now.
…nside to get to millisecond resolution. Callback must be registered before starting a timer.
…w parameters to the init to set period, mode and callback.
…iled in. Leaving timer1 and timer2 for application. Note that music module soft-pwm will also occupy timer1 if enabled.
…ide whether to use MUSIC_PIN define or throw an error. If MUSIC_PIN define is configured the pin argument to music module play() can be elided.
…from mpconfigboard.h if set, in the case of lacking kwarg for pin. Also removing some commented out arguments to remove some confusion in the argument list. Done for both play() and pitch().
dpgeorge and others added 22 commits October 4, 2017 18:07
Printing "(null)" when a NULL string pointer is passed to %s is a debugging
feature and not a feature that's relied upon by the code.  So it only needs
to be compiled in when debugging (such as assert) is enabled, and saves
roughy 30 bytes of code when disabled.

This patch also fixes this NULL check to not do the check if the precision
is specified as zero.
Duplicating pattern for detecting location of libm, libc and libgcc
from teensy port. Activating MICROPY_FLOAT_IMPL (FLOAT) for nrf52 targets
and adding libs into the compile. For nrf51 targets it is still set to
NONE as code grows to much (about 30k).

Some numbers on flash use if MICROPY_FLOAT_IMPL is set to
MICROPY_FLOAT_IMPL_FLOAT and math libraries are enabled (lgcc, lc, lm).

nrf51:
======

without float support:
   text	   data	    bss	    dec	    hex	filename
 144088	    260	  30020	 174368	  2a920	build-pca10028/firmware.elf

with float support:
   text	   data	    bss	    dec	    hex	filename
 176228	   1336	  30020	 207584	  32ae0	build-pca10028/firmware.elf

nrf52:
======

without float support:
   text	   data	    bss	    dec	    hex	filename
 142040	    356	  36236	 178632	  2b9c8	build-pca10040/firmware.elf

with float support:
   text	   data	    bss	    dec	    hex	filename
 165068	   1436	  36236	 202740	  317f4	build-pca10040/firmware.elf
* nrf: Adding Arduino Primo board support

* nrf: Adding arduino_primo to target boards table in readme.md

* nrf/boards: Activating pyb.LED module for arduino_primo board.

* nrf/boards: Removing define not needed for arduino_primo

Updating arduino_primo board mpconfigboard.h. Removing a define
that was wrongly named. Instead of renaming it, it was removed as
it was never used.
The driver also takes care of calling the Bluetooth LE stack for random values if the stack is enabled. The reason for this is that the Bluetooth LE stack take ownership of the NRF_RNG when enabled. Tolerate to enable/disable on the fly, and will choose to use direct access to the peripheral if Bluetooth LE stack is disabled or not compiled in at all.

Driver has been included in the top Makefile, and will not be compiled in unless nrf51_hal_conf.h/nrf52_hal_conf.h defines HAL_RNG_MODULE_ENABLED (1).
Backport of micro:bit random module.
Plugged into the port as a general random module for all nrf51/nrf52 targets. Works both with and without Bluetooth LE stack enabled.

Behavioral change: seed() method has been removed, as the use of RNG peripheral generates true random sequences and not pseudo-random sequences.
This is prep for merging in the NRF5 pull request.
@tannewt tannewt added this to the 4.0 milestone Oct 25, 2017
@tannewt tannewt changed the title Nrf2 merge Nrf52 merge Oct 25, 2017
@@ -177,24 +177,24 @@ CircuitPython:
Ports include the code unique to a microcontroller line and also
variations based on the board.

* `atmel-samd` Support for SAMD21 based boards such as [Arduino Zero][],
* `ports/atmel-samd` Support for SAMD21 based boards such as [Arduino Zero][],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't have to be now, but this can mention SAMD51

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Massive but the part that needed review is small. Looks good! If we have any nlr_ exception raising in our code we should fix it, but doesn't need to be now.

@dhalbert dhalbert merged commit ca1a9b9 into adafruit:master Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.