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?

Parents
  • 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.

Reply
  • 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.

Children
No Data
Related