Code flashing successful but not working!

Hello,

I am creating a new project that uses the nRF52810 as my controller, and during the development stage, I am using the PCA10040 nRF52832 development board. (I read somewhere that we can flash the nRF52810 code into the nRF52832 PCA10040 development board). My requirement is a simple LED indicator based on delay commands from an APK that uses the Nordic UART service to send and receive data. I added the timer peripheral to the ble_app_uart example project from the directory nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\ble_app_uart\pca10040e\s112\ses and flashed the code onto the PCA10040 nRF52832 development board to test it. The code works perfectly.

Then I took an nRF52810 custom PCB and connected the JTAG. The board is able to detect and erase the chip. When I flash the code onto the board, the IDE shows "flash successful," but the board is not working. Are there any other conditions for flashing the code into the nRF52810 custom board? Your response is valuable.

SDK version: 17.0.2
SEGGER Embedded Studio version: 5.42a

Parents
  • Hi,

    If your custom board do not have external 32K crystal, you can try to modify these parameters in sdk_config.h

    // <o> NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
     
    // <0=> NRF_CLOCK_LF_SRC_RC 
    // <1=> NRF_CLOCK_LF_SRC_XTAL 
    // <2=> NRF_CLOCK_LF_SRC_SYNTH 
    
    #ifndef NRF_SDH_CLOCK_LF_SRC
    #define NRF_SDH_CLOCK_LF_SRC 0
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
    #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
    #define NRF_SDH_CLOCK_LF_RC_CTIV 16
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
    // <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
    // <i>  if the temperature has not changed.
    
    #ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
     
    // <0=> NRF_CLOCK_LF_ACCURACY_250_PPM 
    // <1=> NRF_CLOCK_LF_ACCURACY_500_PPM 
    // <2=> NRF_CLOCK_LF_ACCURACY_150_PPM 
    // <3=> NRF_CLOCK_LF_ACCURACY_100_PPM 
    // <4=> NRF_CLOCK_LF_ACCURACY_75_PPM 
    // <5=> NRF_CLOCK_LF_ACCURACY_50_PPM 
    // <6=> NRF_CLOCK_LF_ACCURACY_30_PPM 
    // <7=> NRF_CLOCK_LF_ACCURACY_20_PPM 
    // <8=> NRF_CLOCK_LF_ACCURACY_10_PPM 
    // <9=> NRF_CLOCK_LF_ACCURACY_5_PPM 
    // <10=> NRF_CLOCK_LF_ACCURACY_2_PPM 
    // <11=> NRF_CLOCK_LF_ACCURACY_1_PPM 
    
    #ifndef NRF_SDH_CLOCK_LF_ACCURACY
    #define NRF_SDH_CLOCK_LF_ACCURACY 1
    #endif

  • hi  ,

    I modified the sdk_config file as per the given instructions. Now I am able to debug through RTT Viewer, but the issue still persists. I am still getting a fatal error, Are there any other memory constraints while flashing the code onto the nRF52810 ?.

  •    

    siltvm said:

    As per your suggestion, I checked the ERRORSRC register while debugging the code. I will attach an image of the ERRORSRC register values on my custom PCB with the nRF52810.

    Based on this, I would suggest checking  suggestion. Check if the UART pin is pulled low.

    regards

    Jared 

  • hi    ,

    As per your suggestion, I have modified the `apply_config()` function in the `nrfx_uart.c` and `nrfx_uarte.c` files. I pulled up the RX pin like this in both drivers:

     if (p_config->pselrxd != NRF_UART_PSEL_DISCONNECTED)
        {
            nrf_gpio_cfg_input(p_config->pselrxd, NRF_GPIO_PIN_PULLUP);
        }
     

    Now the nRF52810 custom PCB advertises its name, but after a few seconds, the board turns off. I debugged the code and observed that the issue still persists. I am sharing my debug console output for better understanding. You can see the ERRORSRC register values in the picture. Your response is very valuable..

  • You can consider using app_timer one single shot mode instead of nrf_delay_ms.

    nrf_delay_ms will occupy mcu resource and may disturb ble stack and interrupt handler.

  • hi ,   I just modified it as per your suggestion. When I am debugging the code, I am getting the same error situation as before. Can you check the flash and RAM memory configuration of the section placement macros?

     ‘s112_nrf52_7.2.0_softdevice.hex’    - size 98.7kb.

      ‘ble_app_uart_pca10040e_s112.elf’     - size 31.7kb

    section placement macros in linker . 

    FLASH_PH_START=0x0

    FLASH_PH_SIZE=0x30000

    RAM_PH_START=0x20000000

    RAM_PH_SIZE=0x6000

    FLASH_START=0x19000

    FLASH_SIZE=0x17000

    RAM_START=0x200022c8

    RAM_SIZE=0x3d38

    is this configuration is correct ?

    each response is valuble . 

  • I think the settings is ok. Because you can see the advertising of your device.

    Call stack contents shows the error is from uart_event_handler.

    Can you use break point to check the error is from case APP_UART_DATA_READY or other case?

Reply Children
No Data
Related