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

Number of nRF51822 high drive pins

The nRF51822 Product Specification says that "Maximum number of pins with 5 mA high drive is 3."

Does that mean that you can only configure 3 pins as high drive, or could I (for example) configure all pins as high-drive output, as long as no more than three of them source or sink 5 mA at any time? (And is it really 5 mA per pin, or 15 mA total? Could I have 5 pins all sourcing 3 mA each?)

Parents
  • To further clarify Annims answer, you can drive 15mA current with GPIOs at a given time, in any combination you like, 3x5mA, 15x1mA, (2x5mA + 5x1mA), doesn't matter

  • Can you please verify my configuration of the GPIO high drive Mode does both of the pin 6 and 7 will be drive 5mA or do i ahve modify something please give me some suggestion because am not hearing loud sound in my buzzer

    static void PWMinit(void)

    {

    nrf_gpio_range_cfg_output(6,7);
    

    NRF_GPIO->PIN_CNF[6] = (GPIO_PIN_CNF_DRIVE_H0D1 << GPIO_PIN_CNF_DRIVE_Pos);

    NRF_GPIO->PIN_CNF[7] = (GPIO_PIN_CNF_DRIVE_H0D1 << GPIO_PIN_CNF_DRIVE_Pos);

    ret_code_t err_code;
    

    app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_2CH(159UL,6,7);//6.3KHz

    pwm1_cfg.pin_polarity[1] = APP_PWM_POLARITY_ACTIVE_LOW;

    /* Initialize and enable PWM. */
    
    err_code = app_pwm_init(&PWM1,&pwm1_cfg,pwm_ready_callback);
    
    APP_ERROR_CHECK(err_code);
    
    app_pwm_enable(&PWM1);
    
    for(int i = 0; i < 3; i++)
    

    {

    app_pwm_channel_duty_set(&PWM1, 0, 50);

    nrf_delay_ms(1000);
    app_pwm_channel_duty_set(&PWM1, 0, 0);
    
    nrf_delay_ms(2000);
      app_pwm_channel_duty_set(&PWM1, 0, 70);
    

    }

    app_pwm_disable(&PWM1);

    }

Reply
  • Can you please verify my configuration of the GPIO high drive Mode does both of the pin 6 and 7 will be drive 5mA or do i ahve modify something please give me some suggestion because am not hearing loud sound in my buzzer

    static void PWMinit(void)

    {

    nrf_gpio_range_cfg_output(6,7);
    

    NRF_GPIO->PIN_CNF[6] = (GPIO_PIN_CNF_DRIVE_H0D1 << GPIO_PIN_CNF_DRIVE_Pos);

    NRF_GPIO->PIN_CNF[7] = (GPIO_PIN_CNF_DRIVE_H0D1 << GPIO_PIN_CNF_DRIVE_Pos);

    ret_code_t err_code;
    

    app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_2CH(159UL,6,7);//6.3KHz

    pwm1_cfg.pin_polarity[1] = APP_PWM_POLARITY_ACTIVE_LOW;

    /* Initialize and enable PWM. */
    
    err_code = app_pwm_init(&PWM1,&pwm1_cfg,pwm_ready_callback);
    
    APP_ERROR_CHECK(err_code);
    
    app_pwm_enable(&PWM1);
    
    for(int i = 0; i < 3; i++)
    

    {

    app_pwm_channel_duty_set(&PWM1, 0, 50);

    nrf_delay_ms(1000);
    app_pwm_channel_duty_set(&PWM1, 0, 0);
    
    nrf_delay_ms(2000);
      app_pwm_channel_duty_set(&PWM1, 0, 70);
    

    }

    app_pwm_disable(&PWM1);

    }

Children
No Data
Related