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

How to make a simple LED blink program

Hello Everyone

I am really new to everything here, i just got nRF 52832 board,

Can anyone please tell me the step-by- step method on how to make a program in keil uVision.

Any help will be greatly appreciated.

thanks in advance

Parents
  • Hi,

    There is a blinky example in the SDK. Its located in the folder:

    <SDK_InstallFolder>\examples\peripheral\blinky
    

    You can download the SDK 12.2 here.

  • i know i have been asking you a lot of questions, but please help me as i am new and want to learn and implement on nr52. i got to know from other posts that using the pwm_driver is recommended as nrf52 has an inbuilt pwm hardware. But which parameters to modify in the code to change the DUTY_CYCLE, Total_Cycle period, Pwm frquency as in the code there are parmeters which i found like the following--


    typedef struct { uint16_t channel_0; ///< Duty cycle value for channel 0. uint16_t channel_1; ///< Duty cycle value for channel 1. uint16_t channel_2; ///< Duty cycle value for channel 2. uint16_t channel_3; ///< Duty cycle value for channel 3. } nrf_pwm_values_individual_t;


    typedef enum { NRF_PWM_CLK_16MHz = PWM_PRESCALER_PRESCALER_DIV_1, ///< 16 MHz / 1 = 16 MHz. NRF_PWM_CLK_8MHz = PWM_PRESCALER_PRESCALER_DIV_2, ///< 16 MHz / 2 = 8 MHz. NRF_PWM_CLK_4MHz = PWM_PRESCALER_PRESCALER_DIV_4, ///< 16 MHz / 4 = 4 MHz. NRF_PWM_CLK_2MHz = PWM_PRESCALER_PRESCALER_DIV_8, ///< 16 MHz / 8 = 2 MHz. NRF_PWM_CLK_1MHz = PWM_PRESCALER_PRESCALER_DIV_16, ///< 16 MHz / 16 = 1 MHz. NRF_PWM_CLK_500kHz = PWM_PRESCALER_PRESCALER_DIV_32, ///< 16 MHz / 32 = 500 kHz. NRF_PWM_CLK_250kHz = PWM_PRESCALER_PRESCALER_DIV_64, ///< 16 MHz / 64 = 250 kHz. NRF_PWM_CLK_125kHz = PWM_PRESCALER_PRESCALER_DIV_128 ///< 16 MHz / 128 = 125 kHz. } nrf_pwm_clk_t;

Reply
  • i know i have been asking you a lot of questions, but please help me as i am new and want to learn and implement on nr52. i got to know from other posts that using the pwm_driver is recommended as nrf52 has an inbuilt pwm hardware. But which parameters to modify in the code to change the DUTY_CYCLE, Total_Cycle period, Pwm frquency as in the code there are parmeters which i found like the following--


    typedef struct { uint16_t channel_0; ///< Duty cycle value for channel 0. uint16_t channel_1; ///< Duty cycle value for channel 1. uint16_t channel_2; ///< Duty cycle value for channel 2. uint16_t channel_3; ///< Duty cycle value for channel 3. } nrf_pwm_values_individual_t;


    typedef enum { NRF_PWM_CLK_16MHz = PWM_PRESCALER_PRESCALER_DIV_1, ///< 16 MHz / 1 = 16 MHz. NRF_PWM_CLK_8MHz = PWM_PRESCALER_PRESCALER_DIV_2, ///< 16 MHz / 2 = 8 MHz. NRF_PWM_CLK_4MHz = PWM_PRESCALER_PRESCALER_DIV_4, ///< 16 MHz / 4 = 4 MHz. NRF_PWM_CLK_2MHz = PWM_PRESCALER_PRESCALER_DIV_8, ///< 16 MHz / 8 = 2 MHz. NRF_PWM_CLK_1MHz = PWM_PRESCALER_PRESCALER_DIV_16, ///< 16 MHz / 16 = 1 MHz. NRF_PWM_CLK_500kHz = PWM_PRESCALER_PRESCALER_DIV_32, ///< 16 MHz / 32 = 500 kHz. NRF_PWM_CLK_250kHz = PWM_PRESCALER_PRESCALER_DIV_64, ///< 16 MHz / 64 = 250 kHz. NRF_PWM_CLK_125kHz = PWM_PRESCALER_PRESCALER_DIV_128 ///< 16 MHz / 128 = 125 kHz. } nrf_pwm_clk_t;

Children
No Data
Related