Porting to Nordic Semiconductor nRF52

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
User avatar
tralamazza
Posts: 3
Joined: Sat Jul 30, 2016 1:32 pm
Contact:

Re: Porting to Nordic Semiconductor nRF52

Postby tralamazza » Sat Jul 30, 2016 1:39 pm

Hi all,

I've a VERY basic port working for two nRF52 boards: PCA10040 and D52Q. I have the REPL running over BLE (using nordic's uart service and a small console node app https://github.com/tralamazza/nus_console). I am starting to port the pyb mods (pins etc), but I'm having trouble understanding qstr generation. I haven't pushed my work simply because it's just too basic (just a REPL + BLE UART), but if anyone is interested I could push it.

cheers,
Daniel

User avatar
stoggi
Posts: 1
Joined: Tue Aug 23, 2016 9:33 am

Re: Porting to Nordic Semiconductor nRF52

Postby stoggi » Tue Aug 23, 2016 9:48 am

Hi Daniel,

I'd be keen to try out your REPL on my nRF52 Dev Kit, I was thinking of adding support for the BMD-300 modules.

Jeremy.

jajimenez
Posts: 1
Joined: Thu Aug 18, 2016 11:49 am

Re: Porting to Nordic Semiconductor nRF52

Postby jajimenez » Sat Aug 27, 2016 8:13 pm

Big fan of nRF51/52 chipsets here! :-)

I have some experience programming the nRF51822 directly with Nordic's SDK. It'll be great if you could share your work porting micropython to the nRF52.

Regards,
Jose Jimenez

User avatar
tralamazza
Posts: 3
Joined: Sat Jul 30, 2016 1:32 pm
Contact:

Re: Porting to Nordic Semiconductor nRF52

Postby tralamazza » Wed Sep 07, 2016 4:38 pm

I'm pushing what I've here: https://github.com/tralamazza/micropython/tree/nrf52

Supported hardware: PCA10040 (the official Nordic dev board) and D52Q (dynastream dev board).
I'm building the PCA10040 by default https://github.com/tralamazza/micropyth ... kefile#L21

c45713
Posts: 12
Joined: Fri Dec 09, 2016 7:09 pm

Re: Porting to Nordic Semiconductor nRF52

Postby c45713 » Fri Dec 09, 2016 7:30 pm

Just to add in, i have ported some basic modules for nrf51 and nrf52; uart, spi, leds, pins for various pca100xx boards (10000, 10001, 100028, 10031 and 100040). SD card with FAT is up running using the sdcard.py library. Also got an initial port of modusocket and modnetwork working, providing IPv6 over bluetooth using nordic SDK components as plug-ins. I will contribute this to tralamazza's fork.

HW UART REPL and LEDs for nrf51/nrf52 targets are currently in a branch:
https://github.com/tralamazza/micropyth ... o_sdk/nrf5

c45713
Posts: 12
Joined: Fri Dec 09, 2016 7:09 pm

Re: Porting to Nordic Semiconductor nRF52

Postby c45713 » Tue Dec 13, 2016 8:59 pm

I have now pushed all i got to the dev branch in the previous post. So, please try it out. :)

I'm not sure what to port next, so if there are any wish, please let me know (... or help out with the porting). Personally i would like to wrap up the BLE 6lowpan NIC for modusocket i started in the port, and extend the SPI module to handle more instances.

Cheers,
Glenn

OwenBrotherwood
Posts: 2
Joined: Sat Feb 04, 2017 9:12 am

Re: Porting to Nordic Semiconductor nRF52

Postby OwenBrotherwood » Sat Feb 04, 2017 9:17 am

Hello nice Python guys,

How is on board python doing on nRF52?
Is there a github that has recent commits, or has it gone "dead"?

Why would I like to breath life into this effort?

Well, kids need a choice: do they want to use javascript or python on board?

https://www.tindie.com/products/gfwilli ... no-puckjs/ is one nice bit of hardware for fun, but in javascript (excellent as it may be)

But the kids I teach in Denmark, deserve a choice of poison: javascript or python on board.

In olden days, I had zx80 and many other on board basic machines with poke and peek.

Today, the kids have the micro controller to get a real kick out of: but for one subset of micro controller, maybe no choice.

import "nrf52" and get going?

OwenBrotherwood
Posts: 2
Joined: Sat Feb 04, 2017 9:12 am

Re: Porting to Nordic Semiconductor nRF52

Postby OwenBrotherwood » Sat Feb 04, 2017 9:24 am

I have a nRF52-DK and a https://www.tindie.com/products/gfwilli ... no-puckjs/ (which is a nice bit of hw).

Is there something I can help with to test such that the kids I teach as a volenteer can choose javascript or python on board?

Please note: I need to concentrate on javascript, but I want the kids to choose their own poisen

User avatar
dhylands
Posts: 2374
Joined: Mon Jan 06, 2014 6:08 pm
Location: Shuswap, BC, Canada
Contact:

Re: Porting to Nordic Semiconductor nRF52

Postby dhylands » Sat Feb 04, 2017 6:45 pm

I haven't tried it myself, but I believe that this is branch you'd want:
https://github.com/tralamazza/micropyth ... rf5_no_sdk

c45713
Posts: 12
Joined: Fri Dec 09, 2016 7:09 pm

Re: Porting to Nordic Semiconductor nRF52

Postby c45713 » Sat Mar 11, 2017 4:21 pm

Hi,

It's been a while since my last post, so why not give a short update on the branch progress; https://github.com/tralamazza/micropyth ... rf5_no_sdk

The branch has now modules for: UART, SPI, Leds, Pins, ADC, I2C, PWM (nrf52 only), Temperature and RTC (real time counter). The modules are not feature complete, and might not fully implement the upstream micropython APIs, but are in a working state.
For fun, there is also some python modules for displays and graphics written in c. However, these might go, and get moved to a different repository later.

In addition to the peripheral modules, i have added a Bluetooth LE module called ubluepy, inspired by the interface from the cpython package bluepy. Today it supports the Peripheral role. The module can be used both by nrf51 and nrf52832 targets (using nordic bluetooth stack s110 and s132). Not supporting nrf52840 yet (s140).

The bluetooth module driver also made it possible to create a new Bluetooth LE UART service implementation, providing Bluetooth REPL on nrf51 targets, and nrf52832. I have run the Bluetooth REPL on micro:bit, pca10028 and pca10040. However, I assume the other boards will work as well :)
On the PC side, i'm using Daniel's nus_console: https://github.com/tralamazza/nus_console

Cheers,
Glenn


Return to “Other Boards”

Who is online

Users browsing this forum: No registered users and 1 guest