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

How to develop for nRF51822 using SDK 10?

I'm just getting started with some Nordic development. This is on Linux (Ubuntu 12.04LTS) using nRF51 SDK 10.0 and gcc arm embedded toolchain. I have a PCA10031 and a PCA10000.

Using the PCA10031, I can go to nRF51_SDK_10.0.0_dc26b5e/examples/ble_peripheral/ble_app_hrs/pca10031/s110/armgcc and run "make ; make flash_softdevice ; make flash nrf51422_xxac_s110", and that works. In other words I can see the "Nordic_HRM" in a bluetooth scan, connect to it, and get data.

Using the PCA10000 (with nRF51822 instead of nRF51422), if I run the same commands, that apparently flashes ok (it verifies with nrfgprog --verify) but it doesn't run (nothing visible on bluetooth, nothing on debug UART). I tried changing -DBOARD_PCA10031 to -DBOARD_PCA10000 everywhere in the Makefile, and rebuilding, same result.

How can I get the ble_app_hrs example to run on the PCA10000? (or any other example eg ble_app_uart, on any other dev board using nRF51822)

I need to know this since even if I develop on PCA10031 now, eventually I will have to move my custom code to a module based on nRF51822.

  • PCA10000 is a rev 2 chip (unless it's really old and rev 1), PCA10031 is a rev 3 chip. Anything you build which is custom will have a rev 3 chip on it so you should really keep testing on the rev3 board, not the old one. S110 V8 does work on rev 2 chips, although you are supposed to set some options (eg BLE_COMMON_OPT_RADIO_CPU_MUTEX) to make it properly compatible. The SDK you're using it with however is very not compatible, any of the drivers in there have none of the workarounds for any of the silicon issues in that older revision.

    That said the simple examples usually do work ok. Did you fix your linker file properly for the amount of flash and RAM on the PCA10000? And have you tried debugging to see where you end up, hardfault, error handler etc?

    The nrf51422 / nrf51822 differences are basically none - so the fact the PCA10031 has an nrf51422 on it is irrelevant. The differences between rev 2 and rev 3 .. they are much more critical. So you really want to just test on the PCA10031 as that's the one compatible with your SDK.

  • RK - Thanks, this is good to know! I won't mess around with rev 2 in that case, I'll just get another new dev kit. Would off-the-shelf modules be rev2 or rev3? (For example Xuntong PTR5518, assuming they are recent production, ie in the last few months).

  • You need to ask and you need to ask very carefully and often more than once. I know for instance that the Rigado BMD200s are rev3 and have been for a long time, the less you spend on the module, the more likelihood you have that you get an older chip.

Related