Page 1 of 5

Porting to Nordic Semiconductor nRF52

Posted: Fri Aug 14, 2015 1:39 pm
by badi
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!

Re: Porting to Nordic Semiconductor nRF52

Posted: Fri Aug 14, 2015 4:09 pm
by badi
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.

Re: Porting to Nordic Semiconductor nRF52

Posted: Thu Oct 01, 2015 8:48 pm
by Visit
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.

Re: Porting to Nordic Semiconductor nRF52

Posted: Tue Apr 19, 2016 11:09 am
by wayne
Hiya @badi , did you make any progress with the port?

Re: Porting to Nordic Semiconductor nRF52

Posted: Sat Apr 23, 2016 3:55 pm
by badi
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/

Re: Porting to Nordic Semiconductor nRF52

Posted: Sun Apr 24, 2016 1:08 pm
by wayne
Thanks for the info.
I've got micro python saying 'hello world' to me over serial on the nrf52.

Re: Porting to Nordic Semiconductor nRF52

Posted: Tue Apr 26, 2016 2:58 pm
by roland_vs
@badi: if you need any help (hardware design etc.) let me know. I would also like to use mpy on the nRF52.

Regards,

Roland

Re: Porting to Nordic Semiconductor nRF52

Posted: Thu May 12, 2016 8:06 am
by Peter.Kenyon
any updates on this, it would be nice to program a ble (smart) device in python

Re: Porting to Nordic Semiconductor nRF52

Posted: Thu May 12, 2016 8:32 am
by Peter.Kenyon
@badi: I had a look at the limifrog - nice board - but no mention of micropython

Re: Porting to Nordic Semiconductor nRF52

Posted: Thu May 19, 2016 8:18 pm
by badi
@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.