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

nRF51822 QFAAC0 code compatibility with nRF51422AC on nRF51 DK?

Hey,

I have written a custom service for my company's sensor readings on the nRF51 DK, on top of the uart peripheral example given n SDK_11.0.0. However, for the final product development, the PCB will be using nrf51822 since it's cheaper and we don't need ANT in our product. For testing code compatibility, I have used one of the RFduino's (has nrf51822 chip) to upload the code. I have erased the boot loader and programmed the correct Softdevice S130. I also changed the target device in the code and IRAM and IROM addresses for S130 with memory of nRF51822:

IROM base: 0x1B00 - 0X25000 (256kB flash) IRAM base: 0x20001870 - 0x2790 (16kB RAM)

I also changed the clock in initialisation of SoftDevice to:

#define NRF_CLOCK_LFCLKSRC      {
                                 .source        = NRF_CLOCK_LF_SRC_SYNTH,            
                                 .rc_ctiv       = 0,                                
                                 .rc_temp_ctiv  = 0,                               
                                 .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}

Which synthesises the low frequency clock from high frequency since RFduino doesn't have an external 32.768KHz oscillator.

I have tested the program is correctly flashing the LED's I soldered on two GPIO pins. I have also tested that the clock is correctly working by using a timer to flash LED's every second and it did indeed work. However, the bluetooth is not advertising although there aren't any compile errors. I have pinpointed the function where I guess the bluetooth might not be working. In the static void ble_stack_init(void):

err_code = softdevice_enable(&ble_enable_params);

I tried using breakpoints to see what went wrong, but I can't figure out the problem.

My only guess is because the revision of nrf chip on RFduino is not compatible with SDK 11.0.0?

Parents
  • Yes, I do get to ble_advertising_start() with err_code = 0; meaning there are no errors. I already initialised the crystal to be LFCLKSRC synthesised from the 16MHz crystal since the RFduino doesn't have a 32.678 crystal, and I checked if the crystal is working by using a timer to blink an LED every second. It did work. I have the nRF51 DK and the existing code does work on it however I need to program the nRF51 IC in the RFduino since it's the device that's soldered to our PCB. Currently, we are designing a new PCB with just the nRF51822 IC, however we're scared we will run into code compatibility problems just like we did with IC in RFduino and would want to ensure that revision we choose will be compatible with the existing code.

Reply
  • Yes, I do get to ble_advertising_start() with err_code = 0; meaning there are no errors. I already initialised the crystal to be LFCLKSRC synthesised from the 16MHz crystal since the RFduino doesn't have a 32.678 crystal, and I checked if the crystal is working by using a timer to blink an LED every second. It did work. I have the nRF51 DK and the existing code does work on it however I need to program the nRF51 IC in the RFduino since it's the device that's soldered to our PCB. Currently, we are designing a new PCB with just the nRF51822 IC, however we're scared we will run into code compatibility problems just like we did with IC in RFduino and would want to ensure that revision we choose will be compatible with the existing code.

Children
No Data