This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bootloader s120 for nRF51822 example

Hello,

I am trying to adapt a bootloader from sdk examples to my nRF51822 board without success.

I am able to adapt the example apps from the SDK (I have to change the clocks as I use different ones than the ones in the dev. boards) but there is no way I can make them work.

Examples are fine, even the ones I adapted myself for s120 and the default one for s130. I tried and tested them on a PCA10028 dev. board. But none of them working on my nRF51822 board.

Is there any example for it? Did anyone managed to port a nRF51422 bootloder to nRF51822?

Thanks a lot in advance.

Best regards...

  • The marking on my chip is: N51822_QFAAG3_1440BK. Started to work with SDK 7.1 and SD s120 1.0.1 and ported the app to SDK 8.1 and Softdevice S120 2.1.0 which I'm working with now. FYI, Aryan is also checking this issue and he said maybe for tomorrow he will have a solution. You can see it in my other thread here. Thank you for your help.

  • So you have a revision 2 chip on your custom board, and on the PCA10028 nRF51 DK you have a revision 3 chip, so there could be something there. Please see the compatibility matrix for more information. If you use SoftDevice 2.1.0 with a revision 2 chip you need to enable mutual exclusion between the radio and the application. Please see the Changes section in the S120 2.0.0 release notes for more information. It could be something to try out. If you haven't already done it.

  • Thank you! I will definitely try it out as soon as I can and I will let you know...

  • Added this in main.c in my bootloader:

    uint32_t opt_id = BLE_COMMON_OPT_RADIO_CPU_MUTEX;
    			ble_opt_t cpu_blocking_enabled;
    			cpu_blocking_enabled.common_opt.radio_cpu_mutex.enable = 0;
    		
        // If stack is present then continue initialization of bootloader.
        ble_stack_init(!app_reset);
    			err_code = sd_ble_opt_set(opt_id, &cpu_blocking_enabled);
        scheduler_init();
    

    Id I did it well, still doesn't work...

  • With SoftDevice S120 2.1.0 the mutual exclusion between the radio and the application is disabled by default. You need to enable this to use it on a revision 2 chip. Try:

    cpu_blocking_enabled.common_opt.radio_cpu_mutex.enable = 1;
    
1 2 3