How to add nrf9160 to Espruino?

Posted on
  • New chip from Nordic nrf9160, how to add this device support to Espruino?

  • the hardware is similar to nrf52 but the SDK is different
    https://developer.nordicsemi.com/nRF_Con­nect_SDK/doc/latest/nrf/index.html
    it uses Zephyr RTOS and does not use SoftDevice so the API is quite different.

    The port is of course possible but it is not about adding support for this chip to existing nrf52 codebase, it is more like adding new architecture.

  • ...and reading about the chip, it suggests to use an nrf52840 as application / board controller - like a cpu (of course w/ BLE comm support) - and use the nrf9160 as gps and 'cell phone communication' chip / device / function. nrf9160 has an AT-command set. How this command set goes beyond the usual control of a 'cell phone communication' to control the other features (GPS,...), I don't now. If may be up to the implementer to add the control w/ other SW components to the firmware w/ the AT-command set. To have gps and cell phone on the same chip makes sense, because it serves a faster and more precise and more available geolocation service.

    I'm expecting that the module will become available preloaded with some basic firmware with AT-Commands extended for / combined with control for GPS, etc. and can be used as just any other peripheral device from any Espruino board, like all the ESP8266EX based devices, of which the ESP-01 model was the first one and was featured with the advent of Espruino PICO, and later version with Espruino-Wifi with a better integration. Of course you can go the same route and port Espruino base firmware, extended with integration for and complemented with all the other, nrf9160 required libraries. Since the architecture is a bit different - ARM Cortex-M33 vs -M4, it will amount to 'some' work, as @fanoush points referencing the different SDK. Doing such a port and not having BLE seems to me not worth pursuing.

  • it suggests to use an nrf52840 as application / board controller - like a cpu (of course w/ BLE comm support) - and use the nrf9160 as gps and 'cell phone communication' chip / device / function.

    Well, there is application core inside https://infocenter.nordicsemi.com/topic/­ps_nrf9160/chapters/cpu/doc/application_­core.html?cp=2_0_0_3
    "The nRF9160 application core has a modern and powerful ARM® Cortex®-M33 with on-chip flash and RAM exclusively for application use."

    ESP32 or 8266 can also be used for both - being just a network device or running the full application.

    true that e.g. the nrf5340 has two cores - application and network
    https://infocenter.nordicsemi.com/topic/­ps_nrf5340/keyfeatures_html5.html?cp=3_0­_0
    and nrf9160 has only one

  • @fanoush, yep... posts were crossing each other. Would like also to mention that both devices share components, where on nrf9160 some of them are enhanced / next gen versions, in other words, the same and not the same, and that adds to the trickyness.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How to add nrf9160 to Espruino?

Posted by Avatar for user135683 @user135683

Actions