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

Migrate project using SDK14.1 S132 to use S140

Hi

Im trying to figure out how to migrate my quite large older project from  and softdevice s132 to using s140 (SDK14.1 )in order to experiment with long range.

Besides changing header- and hex-files I think I need to change some Ram and flash setting is that correct? Which settings exactly do I need to change? 

(using arm gcc not SEGGER)

BR Mike

  • Hi,

    Could you let me know which nRF5 devices you are running? I have seen you mention S130, S132, and S140 in questions here.

    S130 is intended for nRF51 devices.

    S132 is intended for nRF52832 devices.

    S140 is intended for the nRF52840 device.

    Only the nRF52840 device has the hardware required to run Bluetooth long range. Changing the SoftDevice is not sufficient, you will also have to change to nRF52840.

    Best regards,
    Rune Holmgren

     

  • Hello sorry for the confusion

    My setup now: SDK14.1 S132 NRF52832

    My Setup for long range testing: SDK 14.1 S140 NRF52840

    My program need porting from S132 to S140

  • You are correct in what changes you need to make, but you will also need to:

    Replace these files:

    • /components/toolchain/gcc/gcc_startup_nrf52.S -> /components/toolchain/gcc/gcc_startup_nrf52840.S
    • /components/toolchain/system_nrf52.c -> components/toolchain/system_nrf52840.c

    Replace these defines and assembler flags:

    • BOARD_PCA10040 -> BOARD_PCA10056
    • RF52832_XXAA -> NRF52840_XXAA
    • S132 -> S140

    Add these defines and assembler flags:

    • FLOAT_ABI_HARD

    Remove these defines and assembler flags:

    • NRF52_PAN_74
    • NRF52

    Addtionally in the linker script I see that there are some sections which have "SORT()" added on nRF52840, which may be necessary for you as well.

    If your implementation is not changed from the default too much it may be simpler to copy a Makefile and linkerscript from the SDK and use that with whatever changes you need.

    Best regards,
    Rune Holmgren

  • ok its now building but the advertising does not seem to be working although not getting an error(scanning with the nrfConnect app)

    have set the adv_params to be 1MBPS on physical properties so it should not be a problem

    EDIT : when we set scannable and legacy_pdu  to 1 it seems to be working. But we are having difficult time finding out what these parameters do exactly

    Ive read that legacy PDU should be set when using advertising extension but I dont recall setting this explicitly anywhere. Where is this done?

  • Hi,

    Sorry for the late reply.

    You may have already seen this, but here is the migration guide for getting from SDK 14 to SDK 15. If you have a look at the section regarding "Advertising Extensions using the Advertising module" you will find the statement "Make sure ble_adv_extended_enabled = false; to preserve advertising functionality similar to older SDKs."

    You have probably inadvertently enabled the advertisement extension when porting the code. Ensure that API call "sd_ble_gap_adv_set_configure" is done with something like this as the ble_gap_adv_data_t parameter:

    .....adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED;

    When you have everything working as intended, you may re-enable the advertisement extension if you want and set up everything correctly to use it. I am just recommending getting the port working as it used to first.

    Best regards,
    Rune Holmgren

Related