Porting to Nordic Semiconductor nRF52
Porting to Nordic Semiconductor nRF52
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!
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
Re: Porting to Nordic Semiconductor nRF52
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.
Therefore micropython should fit on the chip.
badi
Re: Porting to Nordic Semiconductor nRF52
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.
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
Hiya @badi , did you make any progress with the port?
Re: Porting to Nordic Semiconductor nRF52
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/
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
Re: Porting to Nordic Semiconductor nRF52
Thanks for the info.
I've got micro python saying 'hello world' to me over serial on the nrf52.
I've got micro python saying 'hello world' to me over serial on the nrf52.
Re: Porting to Nordic Semiconductor nRF52
@badi: if you need any help (hardware design etc.) let me know. I would also like to use mpy on the nRF52.
Regards,
Roland
Regards,
Roland
-
- Posts: 70
- Joined: Wed Oct 14, 2015 5:07 pm
Re: Porting to Nordic Semiconductor nRF52
any updates on this, it would be nice to program a ble (smart) device in python
-
- Posts: 70
- Joined: Wed Oct 14, 2015 5:07 pm
Re: Porting to Nordic Semiconductor nRF52
@badi: I had a look at the limifrog - nice board - but no mention of micropython
Re: Porting to Nordic Semiconductor nRF52
@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:
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.
In the micropython subfolder you find a little guide how to micropythonize Limifrog.>
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
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