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

NRF52832-QFAB-R loader script

Hello,
I modified the ble_app_blinky example to work on our board (removed leds and buttons) and modified the board pca10040.h
the new application worked on the devkit but not in our board.
As the chip in the devkit is not the same used on our board (NRF52832-QFAB-R) is there any thing that I need to modify? like ble_app_blinky_gcc_nrf52.ld?

Thanks.

  • dud you succeed to debug the application? Do you have a programmer that you can use for this? How did you program your custom board?

    BR,

    Edvin

  • Hello

    programming is not an issue, I use this: https://www.silabs.com/documents/public/user-guides/efm32lg-stk3600-ug.pdf

    the kit is connected to SWIO et SWCLK of the nrf52 to perform the programming.

    yes I did debug the application, I tried with the blinky example from peripheral under s10040/blank/armgcc as this is the simplest example. When I start debugging with Ozone I see that the nrf52 reset when it try to configure the PIN 16 (LED PIN in the custom board), exactly here:

    __STATIC_INLINE void nrf_gpio_port_out_clear(NRF_GPIO_Type * p_reg, uint32_t clr_mask)
    {
        p_reg->OUTCLR = clr_mask;
             0000 0326   F44F 3280  MOV     R2, #0x10000
             0000 032E   F8C3 250C  STR     R2, [R3, #+0x50C]
             0000 0332   E7ED       B       #-0x26 ;<bsp_board_init>+0x4 ;310
    }

    Then I removed the debugger connection with the custom board and removed the battery and plug it again to be sure that the device reset completely and then my board worked!

    So I tried again to program the same example as usual :

    $ nrfjprog --eraseall

    $ nrfjprog -f nrf52 --program _build/nrf52832_xxaa.hex --sectorerase

    $ nrfjprog --reset

    the application don't start as usual so I unplug/plug the battery and the application don't start.

    So I connected the debugger and start debugging and see the same result as before (reset when configuring pin 16), then when I removed the debugger connection and unplug/plug the battery the application started!! It seems like when I run the debugger it do something (I don't know what) that enable the application to start after !!

    What is wrong in what I'm doing?

  • I don't understand exactly why it stops there when you are debugging. Have you tried to monitor the log? 

    Do you know what parameters nrf_gpio_port_out_clear() was called with when it stopped?

  • I don't use log.

    the parameters:

             0000 0326   F44F 3280  MOV     R2, #0x10000
             0000 032E   F8C3 250C  STR     R2, [R3, #+0x50C]
             0000 0332   E7ED       B       #-0x26 ;<bsp_board_init>+0x4 ;310

    clr_mask = 0x10000   => pin 16

    p_reg->OUTCLR = 0x5000 0000 + 0x50C

  • To resume, the only way to start the application on my custom board is to do these steps:

    1- flash the application

    2- start the debugger (ozone)

    3- remove connection with the debugger

    4- remove the battery

    5- reconnect the battery then it works

Related