This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can I migrate my application code over to an M3 from the nRF51822 Cortex M0?

Hi, I've been using your nRF51822 with considerable success. I now need to migrate across to an M3 for greater power. I want to keep most of the application code I wrote for the M0 on the nRF51822, is this possible/difficult to do?

cheers!

  • Yes, this should most definitely be possible, without an extreme effort. Any peripheral use will have to be changed, to cope with the new device's peripheral setup, but if the other device is also CMSIS compliant, this should at least be very similar in the way it feels.

    As for the BLE part, you will have to find a way to get BLE connectivity. The definitely easiest way to get up and running with BLE on an M3 is to use the nRF8001, which is a ready-made connectivity chip. The nRF8001 has a high-level serial interface called ACI, and the GATT setup can be done visually with nRFgo Studio.

    If however you need high data throughput, or a great deal of flexibility in your BLE setup, doing an nRF51822 based connectivity solution may be better. In the latest SDK, there is an example of how to do this, basically by just exposing the raw softdevice interface over a serial interface.

    Another option, which would give less data transferred over the serial interface, would be to implement the BLE application on the nRF51822 and only transmit functions and events the other processor actually needs over the serial transport. This could then be more high-level events. For for example a glucose application it could be possible to keep the entire database of measurements on the nRF51822, and don't even tell the application processor when devices are connected or similar.

    It isn't really possible to give a catch-all solution to such question, since the answer is so application dependent. Feel free to create a support case and supply more details to get a more specific answer, tailored for your application.

  • Sample ARM-Cortex M3 drivers for the nRF8001 are also available on request from the support portal. The lpc1768 and lpc1769 have the required drivers and sample code for the nRF8001.

  • Can we please know where to request for the sample code?

  • I am interested in the nRF8001 solution. I have the nRF8001 SDK. Do you have instructions on best way to port? I am assuming I just need to modify the Hardware Abstraction Layer modules? Any drivers available for the Energy Micro ARM-cortex M3?

  • This is great info! To evaluate approach 2. Do you think I can port the "Heart Rate Application - Serialized" to M3? Then run the "BLE S110 Connectivity Chip project" on the nRF6310 motherboard, and just connect the two using uart. I am assuming I would just have to change the UART layer? I would be very grateful for any suggestions. thanks

Related