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
badi
Posts: 44
Joined: Mon Aug 10, 2015 2:18 pm
Location: Bern, Switzerland

Porting to Nordic Semiconductor nRF52

Post by badi » Fri Aug 14, 2015 1:39 pm

Hello

Nordic semiconductor pre-release in June a new serie (nRF52) of their Bluetooth smart chips (http://www.nordicsemi.com/eng/News/News ... ch-to-Pair). As python moved with the WiPy (I am looking forward to received the one I ordered!) to the edge of the internet, there is a place beyond where the energy consumption must even be lower - and this is where the Bluetooth smart (Version 4.1) has (at least in my opinion) a high potential.

In a first step I'd like to port Micropython to this ARM Cortex-M4F (64MHz, 512kB Flash and 64kB RAM) on the purchased Nordic nRF52 development kit. I looked in the build size of several other embedded platforms and the all below 256kByte so the Flash should be enough. But what about the RAM? Of course this depends of the scripts I write - but from your experience what do you think? Is it usable for simple tasks?

Successful finishing step 1 I would like to build in a second step a bluePy Board based on nRF52 devKit, matching the size and connector of the microPython/WiPy board. Plugged into the micropython or WiPy board, bluePy may act as a simple bluetooth modem connected to the UART. Standalone it may works an intelligent (sensor/actuator) node. Dependent on the public interest I could build a series of this boards and sell them. Related to this step I would like to know which regulation I have to respect in producing and selling electronic good (of course RoSH..)? Is anyone even interested in such a board? Should I do a kickstarter?

Further SW-Task could be to realize a mesh-library for sending data package over the mesh of connected devices. As an inspiration have a look at http://www.synapse-wireless.com and their SNAPy. Further there could be an energy harvesting board based on the TI BQ25570. Together with WiPy/BluePy I then can talk (for example) from my smart phone to the solar powered - bluePy (and Mesh net) enhanced - garden lamps and ask for example for the current temperature/humidity at their site or switch them OFF/ON.

Any feedback is welcome!
badi

User avatar
badi
Posts: 44
Joined: Mon Aug 10, 2015 2:18 pm
Location: Bern, Switzerland

Re: Porting to Nordic Semiconductor nRF52

Post by badi » Fri Aug 14, 2015 4:09 pm

I found a statement by pfalcon (http://forum.micropython.org/viewtopic.php?f=12&t=685) "MicroPython requires minimum 128K of Flash, 8K of RAM".

Therefore micropython should fit on the chip.
badi

Visit
Posts: 1
Joined: Thu Oct 01, 2015 8:39 pm

Re: Porting to Nordic Semiconductor nRF52

Post by Visit » Thu Oct 01, 2015 8:48 pm

It's really nice to know that you are working on that.
I am currently use Nordic nRF51822 for our project, it will be ideal if we can write the code in Python instead.
Yes, I will definitely support your board.

wayne
Posts: 3
Joined: Wed Mar 09, 2016 2:58 pm

Re: Porting to Nordic Semiconductor nRF52

Post by wayne » Tue Apr 19, 2016 11:09 am

Hiya @badi , did you make any progress with the port?

User avatar
badi
Posts: 44
Joined: Mon Aug 10, 2015 2:18 pm
Location: Bern, Switzerland

Re: Porting to Nordic Semiconductor nRF52

Post by badi » Sat Apr 23, 2016 3:55 pm

I had to learn a little bit about the internals of micropython and therefore I did a port to STM32F429-discovery kit (Same STM F4 series of MCU) and then I did a port to an other new STM MCU series (stm32l4) and introduced support for the stm32L476-discovery and Limifrog. See the threads:
http://forum.micropython.org/viewtopic.php?f=12&t=777
http://forum.micropython.org/viewtopic.php?f=12&t=1332
Damien did a port to the precursor of nrf52, namely th nRF51 on the BBC micro:bit:
http://ntoll.org/article/story-micropython-on-microbit
https://github.com/bbcmicrobit/micropython
but it uses the micro:bit HAL.

From my side there was no work done yet for this port. However if you are interested in a bluetooth connected micropython board with a heap of sensors have a look at limifrog:
http://www.limifrog.io/
Last edited by badi on Mon Sep 04, 2017 6:51 pm, edited 1 time in total.
badi

wayne
Posts: 3
Joined: Wed Mar 09, 2016 2:58 pm

Re: Porting to Nordic Semiconductor nRF52

Post by wayne » Sun Apr 24, 2016 1:08 pm

Thanks for the info.
I've got micro python saying 'hello world' to me over serial on the nrf52.

User avatar
roland_vs
Posts: 61
Joined: Tue Dec 08, 2015 8:28 pm
Location: Netherlands
Contact:

Re: Porting to Nordic Semiconductor nRF52

Post by roland_vs » Tue Apr 26, 2016 2:58 pm

@badi: if you need any help (hardware design etc.) let me know. I would also like to use mpy on the nRF52.

Regards,

Roland

Peter.Kenyon
Posts: 70
Joined: Wed Oct 14, 2015 5:07 pm

Re: Porting to Nordic Semiconductor nRF52

Post by Peter.Kenyon » Thu May 12, 2016 8:06 am

any updates on this, it would be nice to program a ble (smart) device in python

Peter.Kenyon
Posts: 70
Joined: Wed Oct 14, 2015 5:07 pm

Re: Porting to Nordic Semiconductor nRF52

Post by Peter.Kenyon » Thu May 12, 2016 8:32 am

@badi: I had a look at the limifrog - nice board - but no mention of micropython

User avatar
badi
Posts: 44
Joined: Mon Aug 10, 2015 2:18 pm
Location: Bern, Switzerland

Re: Porting to Nordic Semiconductor nRF52

Post by badi » Thu May 19, 2016 8:18 pm

@Peter.Kenyon: Xavier (the LimiFrog Guy) sent out a kickstarter eMail on the 17.5 to the supporters of Limifrog were he gave credit to micropython for the support:
>
Good news: MicroPython can now run on LimiFrog ! A big thank you to Tobias who did a great work (and to Damien for the integration). See folder micropython under: https://github.com/LimiFrog/LimiFrog-SW
In the micropython subfolder you find a little guide how to micropythonize Limifrog.

The BLE support on Limifrog is still missing. As the BLE binary has to be downloaded to the module at startup it would be a first step to add support for the FLASH chip on the board to support more storage, and it would be best to add a wear leveling flash file system as an intermediate layer.

@wayne Great, where can I find it on github?
@roland_vs Thanks for the offer. The nRF52 development kit has arduino compatible connectors. So I can reuse my 3.3V compatible arduino shields if I ever venture this endeavour.
badi

Post Reply