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

Target name in Makefile pca10028 for nrf51822

Hi, I am using nrf51822 module and sdk v12.2.0. I was compiling code under ubuntu. I observed that pca10028 is configured for nrf51422_xxac target. But i want to use nrf51822. I check some document but i didn't get the proper target name to mention it in Makefile. Which target name i should use for nrf51822 module?

  • You don't need to change the target name.

    AFIK all the nRf51822 examples have the target name set to nRF51422

  • Okay. Then might be there something in my code which is not working on hardware.

    #include <stdbool.h>
    #include <stdint.h>
    #include "nrf_delay.h"
    #include "boards.h"
    
    #define LED1    6
    
    /**
     * @brief Function for application main entry.
     */
    int main(void)
    {
        /* Configure board. */
    //    bsp_board_leds_init();
    //      nrf_gpio_pin_clear(LED_3);
            NRF_GPIO->PIN_CNF[LED1] |= GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos; // Set pullup
            NRF_GPIO->DIRSET = 1<<LED1;
            NRF_GPIO->OUTSET = 1<<LED1;
            nrf_delay_ms(1000);
            NRF_GPIO->OUTCLR = 1<<LED1;
            nrf_delay_ms(1000);
        /* Toggle LEDs. */
        while (true)
        {
            NRF_GPIO->OUTSET = 1<<LED1;
            nrf_delay_ms(1000);
            NRF_GPIO->OUTCLR = 1<<LED1;
            nrf_delay_ms(1000);
    
    //        for (int i = 0; i < LEDS_NUMBER; i++)
      //      {
        //        bsp_board_led_invert(i);
          //      nrf_delay_ms(500);
           // }
        }
    }
    

    This is my code to blink Led on poer P0.6. I flashed the code to nrf51822 chip.Pin is not at all toggling.

  • SDK 12 doesn't have examples for nrf51822. The pca10028 has more memory than the nrf51822, which makes it fail when using the build with a softdevice. I happened to be debugging this yesterday, and wrote a script to convert a pca10028 build to one for pca10001. It converts both the Keil/IAR projects and the Makefile: github.com/.../nrf-pca10028-to-pca10001

  • The main issue is not nRF51822 vs nRF51422

    The nRF51822QFAC has 32kb RAM and the pca10028 BLE demo's work fine on that version of the nRF51822

    The problem only occurs if you have a nRF51822QFAA (or potentially QFAB), as these only have 16k RAM

    QFAB probably does not have enough room for the SD and an application, now that the only nRF51 SD in SDK12 is the S130 So if you have a QFAB you'd need to use an older SDK (possibly SDK 10) which still has the S110 SD as this will fit in the QFAB

  • yes. My chip is QFAA and has 16kb RAM. But even LED blinking is also not working without SD.i checked the hex file from mbed compiler and turns out it is working. That means something is not getting correct. Whenever i gave halt command chip is showing same PC everytime that is 0x00000B02.

Related