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

  • For PWM I strongly recommend to use either the PWM library or the PWM driver. Take a look at the PWM library example:

    SDK_FOLDER\examples\peripheral\pwm_library\pca10040\blank\arm5_no_packs
    
  • thanks but

    when i try to flash this example , it says

    Error: Flash Download Failed - "Cortex - M4"

    How to solve this?

    Also please just let me know which command to use to configure any GPIO pin as a output and then set/reset it so that i can use the above logic to generate a square wave on any choosen gpio pin.

    thanks for your help

  • Have you loaded the SoftDevice? If you try to overwrite the SoftDevice, this can cause the Flash Download failed message. Try to erase the chip, and then flash the application.

    Here is the GPIO functions. Configure the gpio pin as output, using nrf_gpio_cfg_output() and use nrf_gpio_pin_set() to set the pin high, and nrf_gpio_pin_clear() to set the pin low.

  • i had already loaded the softdevice s132 via command line in the beginning when i tried the blinky example, which is still working, and it still shows an option for flash softdevice in drop down menue besides LOAD,

    however, when i try to run the pwm example, it does'nt shows any flash_132 softdevice option in the drop down menu.

    How to load softdevice from keil for each example i try? in the tutorial it says to do the following but it doesn't works

    To program the SoftDevice using an example project in Keil, perform the following steps:

    . Instead of the default target, select the target to flash the SoftDevice, for example, flash_s132_nrf52_1.0.0-3.alpha_softdevice. Click Options for Target. Select the Debug pane and click the Settings button for the J-Link / J-TRACE Cortex. Select J-Link / J-Trace Adapter corresponding to the serial number that is printed on your device. Click OK

  • For projects/examples located in "blank folder", e.g. pca10040\blank, you should not use SoftDevice. You only need the S132 SoftDevice in the projects located in a “pca10040\s132” folder. E.g. the pwm example does not use the SoftDevice, and is thefore loacted in a "blank" folder: examples\peripheral\pwm_library\pca10040\ blank \arm5_no_packs

Related