Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

ble_app_uart won't advertise as coded from example set

Hello, I am currently trying to program the uart example code from the nRF5_SDK_12.3.0_d7731ad zip file. After dealing with various reference address and device package issues, I am now able to flash the softdevice and progam sets to the chip. However, the chip is not advertising and it does work with the premade hex file. At this point I have no idea what could be wrong, the only noticible difference between the hex file layout in nRF Connect and the flashed softdevice and code from Kiel 5 is shown in the attached image, with hex file on the left covers the register address from 0 to 0x0001E3F7 while the flashed program from Keil goes from 0 to 0x0001E3FF. Other than that the recovery error is shown in the command window, but this occured even for the hex file which would advertise so I am unsure how to proceed.

  • Hello Simonr,

    At the momen I'm using the DK, the current issues are occuring on the DK and I haven't tested it on my actual hardware yet. THe hardware in question follows the QFAA build. I am not aware of any aspect in Keil that needs to be set for the specific build, mainly just choosing the type, ie. xxac or xxaa. I have just realized that when I look at the devices listed in the Pack Installer, the only ones available are 8.44.1. However, as can be seen in the second image, I can only get it to run with 8.11.1. Is this what may be causing issues?

    Sincerely,

    Alexandre Tessier

  • Followed the suggested corrections, it now works with the appropriate 8.44.1 startup update, however still no advertising found.

  • Can you show me the build and flash log of when you're flashing the application onto your device? And what device are you using for scanning for advertisements? If you have an nRF52 DK or other supported board, you can use the nRF Sniffer and Wireshark interface to sniff for BLE advertising data to make sure whether the device actually advertises or not.

    Have you tried debugging the application to see whether it runs as expected or if it stops or returns any error codes at some points?

    Best regards,

    Simon

  • Hello Simonr,

    Attache are the build and flash logs of the application.

     

    µVision Build Log
    
    Tool Versions:
    
    IDE-Version: µVision V5.37.0.0
    Copyright (C) 2022 ARM Ltd and ARM Germany GmbH. All rights reserved.
    License Information: Alexandre Tessier, Queen's University, LIC=----
     
    Tool Versions:
    Toolchain:       MDK-Lite  Version: 5.37.0.0
    Toolchain Path:  C:\ncs\ARM\ARM_Compiler_5.06u7\Bin
    C Compiler:      Armcc.exe V5.06 update 7 (build 960)
    Assembler:       Armasm.exe V5.06 update 7 (build 960)
    Linker/Locator:  ArmLink.exe V5.06 update 7 (build 960)
    Library Manager: ArmAr.exe V5.06 update 7 (build 960)
    Hex Converter:   FromElf.exe V5.06 update 7 (build 960)
    CPU DLL:         SARMCM3.DLL V5.37.0.0
    Dialog DLL:      DARMCM1.DLL V1.19.6.0
    Target DLL:      Segger\JL2CM3.dll V2.99.42.0
    Dialog DLL:      TARMCM1.DLL V1.14.6.0
     
    Project:
    
    C:\ncs\nRF5_SDK_12.3.0_d7731ad\examples\ble_peripheral\ble_app_uart\pca10028\s130\arm5_no_packs\ble_app_uart_pca10028_s130.uvprojx
    Project File Date:  09/01/2022
    
    Output:
    
    *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\ncs\ARM\ARM_Compiler_5.06u7\Bin'
    Rebuild target 'nrf51422_xxac'
    Note: source file 'RTE/Device/nRF51422_xxAC/arm_startup_nrf51.s' - object file renamed from '.\_build\arm_startup_nrf51.o' to '.\_build\arm_startup_nrf51_1.o'.
    Note: source file 'RTE/Device/nRF51422_xxAC/system_nrf51.c' - object file renamed from '.\_build\system_nrf51.o' to '.\_build\system_nrf51_1.o'.
    compiling bsp_nfc.c...
    compiling boards.c...
    compiling ble_nus.c...
    compiling ble_conn_params.c...
    compiling bsp_btn_ble.c...
    compiling ble_srv_common.c...
    compiling bsp.c...
    compiling ble_advdata.c...
    compiling ble_advertising.c...
    compiling nrf_drv_clock.c...
    compiling main.c...
    compiling app_error.c...
    compiling app_error_weak.c...
    compiling nrf_drv_common.c...
    compiling app_fifo.c...
    compiling app_button.c...
    compiling app_uart_fifo.c...
    compiling sdk_errors.c...
    compiling app_util_platform.c...
    compiling app_timer.c...
    compiling nrf_drv_uart.c...
    compiling nrf_drv_gpiote.c...
    compiling RTT_Syscalls_KEIL.c...
    compiling SEGGER_RTT_printf.c...
    compiling fstorage.c...
    compiling hardfault_implementation.c...
    compiling nrf_log_backend_serial.c...
    compiling nrf_assert.c...
    compiling retarget.c...
    compiling nrf_log_frontend.c...
    compiling SEGGER_RTT.c...
    compiling softdevice_handler.c...
    assembling arm_startup_nrf51.s...
    compiling system_nrf51.c...
    linking...
    Program Size: Code=13640 RO-data=352 RW-data=212 ZI-data=5828  
    FromELF: creating hex file...
    ".\_build\nrf51422_xxac.axf" - 0 Error(s), 0 Warning(s).
    
    Software Packages used:
    
    
    Package Vendor: ARM
                    http://www.keil.com/pack/ARM.CMSIS.5.9.0.pack
                    ARM.CMSIS.5.9.0
                    CMSIS (Common Microcontroller Software Interface Standard)
       * Component: CORE Version: 5.6.0
    
    Package Vendor: NordicSemiconductor
                    http://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.44.1.pack
                    NordicSemiconductor.nRF_DeviceFamilyPack.8.44.1
                    Nordic Semiconductor nRF ARM devices Device Family Pack with BSD license.
       * Component: Startup Version: 8.44.1
    
    Collection of Component include folders:
    
      ./RTE/_nrf51422_xxac
      C:/Users/Alexa/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include
      C:/Users/Alexa/AppData/Local/Arm/Packs/NordicSemiconductor/nRF_DeviceFamilyPack/8.44.1/Device/Include
    
    Collection of Component Files used:
    
    
       * Component: ARM::CMSIS:CORE:5.6.0
    
       * Component: NordicSemiconductor::Device:Startup:8.44.1
          Source file:   Device/Source/system_nrf51.c
          Source file:   Device/Source/arm/arm_startup_nrf51.s
          Include file:  Device/Include/system_nrf.h
          Include file:  Device/Include/system_nrf51.h
    Build Time Elapsed:  00:00:08

    I am using an nRF51 DK, so I don't believe the Sniffer would work. As far as advertising the device itself does advertise just fine when using the premade hex files found when you download and unzip the example files. Its only when I'm trying to manually flash the softdevice and application Kiel 5 code also found in the examples folder, which I am using the one in the s130 folder based on nRF51422 parameters. From what I can tell with debugging it doesn't seem to throw any errors unless I place a breakpoint, such as at the labled initiation of the advertising, at least from my limited understanding of the debugger for Kiel, as shown below. The error however does not make much sense to me. 

    Sincerely,

    Alexandre Tessier

  • Just verified Sniffer, was tired and realized nRF51 should work but again my boar itself does advertise with the premade hex file and other code, just not with the example code through Kiel.

Related