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

I took all these steps and there is no advertising

Using Segger , only the BLE template is advertising,All other BLE apps such as BLE_UART, will flash the leds very fast but will not show on any Apple device on the Bluetooth.

SDK13 :

I did :

  1. imported the example
  2. replaced thumb_crt0.s with the required one from the guides
  3. added the files system_nrf52.c and ses_nrf52_startup.c
  4. remove from project->build configuration - the soft device
  5. added ../../../../../../components/device to the preprocessor
  6. added: FLASH_START=0x1F000 and SRAM_START=0x20002000 to placement macro
  7. added to additional loader[0] the path to the soft device on the SDK
  8. added to preprocessor definition NO_VTOR_CONFIG
  9. flash_palcment.xml was modified in its original folder ( segger installation folder), and the one in the project is as required in the tutorial.

Build and run.

What is wrong with this specific project that it won't work ? BTW: the ble template project works WITHOUT doing 7 and 8 . ( how ? )

HERE IS THE PROJECT

  • The ble_app_uart example uses more ram than the template project, so you will need to increase the SRAM_START value to SRAM_START=0x200025F8

    You can see how much RAM the examples uses by looking at the linker-script file for gcc.Its located in the folder ble_app_uart\pca10040\s132\armgcc, open the file ble_app_uart_gcc_nrf52.ld in a editor, here you can see that RAM (rwx) : ORIGIN = 0x200025f8, LENGTH = 0xda08

  • Hi, Lola

    I think the problem here is step 6 in your list. The SRAM_START address needs to be set high enough for the SoftDevice to get the amount of memory it requires. For the UART example in SDK 13 and SoftDevice S132 v4.0.2, it should be set to (at least) SRAM_START=0x200025f8. You can find this address in the linker script ble_app_uart_gcc_nrf52.ld in ble_app_uart/PCA10040/s132/armgcc/. The same goes for other examples that uses the SoftDevice. The amount of memory the SoftDevice needs depends on the BLE configurations in each example, and will therefore vary.

    For a more detailed answer, check this post.

    When using Segger Embedded Studio, you can open the debugger and if the SRAM address is set too low, an error message will be printed in the Debug terminal. This will state what the SRAM start address should be set to. Remember first to set the DEBUG flag in the preprocessor definitions to make the device stop on hard fault instead of resetting.

  • WOW !!!!!! IT WORKED! Please, please help me understand this. how is this soft device works? what it does? where its located? when do we need it ? is there an option that there will be space between them? I am not sure I understand what I am doing at all and there is no short explanation other then going over 1000 pages of sdk.

  • Please post it as an answer so everyone can benefit, its important for new users . thank you for that.

  • As Jan Tore mentioned, it depends on how you configure the softdevice. How many services and characteristic you add,etc . If you allocate too little RAM to the SoftDevice, the softdevice will print the amount it needs. See Bjorn's answer Jan Tore Linked to :)

Related