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

Porting an example from pca10056 to pca10056e (Segger embedded studio)

Dear ladies and gentlemen,

I found the following page giving instructions for porting an example from pca10056 to pca10056e:

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fnrf52811_user_guide.html

I'm currently using Segger Embedded Studio (SES), but also would have a working toolchain for using gcc via Eclipse.

The first described step (2) for porting projects is stated to be:

"In the project settings, change to device "NordicSemiconductor->nRF52811_xxaa".

I failed to find that setting (as well for SES as Eclipse), maybe someone can help me out?

Without force, I'd fairly appreciate any further specific information/hint for either eclipse/gcc and/or SES considering the announced porting process on the referenced webpage concerning the named IDEs.

Furthermore;

I used (for peripheral examples) the tiny software device S112, but now the (ble-central) example projects only offer a S140 device.

Do I have to expect problems using the software device S140 on a pca10056e project based on hardware nRF58211, are there any advices or hints on how to proceed/what must be considered?

Best regards,

software device

  • Yes, if you need to select the either the s140 or s122 Softdevice if you want to support scanning. A table of compatible Softdevice versions and variants can be found here: SDKs and SoftDevices

  • Dear Community.

    Following hints of Vidar, I finally chose to use the only given project in the SDK collection that offers pca10056e and S140 support from snatch:

    nRF5_SDK_17.0.2_d674dde/examples/ble_central/ble_app_uart_c/pca10056e/s140/ses

    I compiled and installed the code to a BM833A Evaluation board containing a nRF 52811 chip. This resulted in nothing: neither was the board detectable by using App nRF Connect nor did I receive any data on USB-connected virtual serial port.

    Segger Debugger stops in Assemblercode 0x0000A60 stating "Stopped by vector catch" before I reach first line's code breakpoint which is command log_init().

    But the compatibility matrix that vidar posted suggests, that the S140 is running on nRF52811 SoC.

    I tried to modify the named ble_app_uart_c example's main to:

    int main(void)
    {
        uint32_t i;
        for (i = 0; i < 32; ++i)
        {
            nrf_gpio_cfg_output(i);
            nrf_gpio_pin_set(i);
        }
        for (;;)
        {
                idle_state_handle();
            }
    }

    I compiled the example and uploaded (s140_nrf52_7.2.0_softdevice.hex, ble_app_uart_c_pca10056_s140.hex) without problem. Still, The LEDs on BM833A Evaluation board stayed off.

    Has anyone ever created a minimal example (maybe just switch on a LED) that shows operation for S140 and is willing to provide it here?

    Best regards,

    Richard

  • Hi Richard,

    Getting a "Stopped by vector catch" before reaching main() is usually a indication of invalid memory settings for the target device. 

    Did you adjust RAM_START and RAM_SIZE macros in your project to not exceed the RAM memory range on your 52811? Remember that it only has 24K of RAM compared to the 256KB you have on the 52840. So please make sure RAM_START+ RAM_SIZE does not exceed 0x20006000 (24K).

    Best regards,

    Vidar

  • Hello Vidar,

    From your hint and my efforts so far, I deduct, that the given example from SDK does not work out of the box, event though suggesting it is already adjusted for using S140 on a 52811, as both relevant things are named in the path:

    nRF5_SDK_17.0.2_d674dde/.../.../.../pca10056e/s140/...

    I tried to adjust the .emProject file to keep with S140 and also adjust to the settings of a working S112 peripheral example, but now I think the problem is:

    <quote1 from center.original.emProject, I guess suited for 52840 (and S140?):>

          linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x27000;FLASH_SIZE=0xd9000;RAM_START=0x20002a38;RAM_SIZE=0x3d5c8"
          
          linker_section_placements_segments="FLASH RX 0x0 0x100000;RAM1 RWX 0x20000000 0x40000"

    </quote1>

    <quote2 from some peripheralBeacon.emProject, I guess suited for 52811 (and S112):>

          linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x30000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x6000;FLASH_START=0x19000;FLASH_SIZE=0x17000;RAM_START=0x20001118;RAM_SIZE=0x4ee8"
          
          linker_section_placements_segments="FLASH RX 0x0 0x30000;RAM1 RWX 0x20000000 0x6000"

    </quote2>

    If I simply replace quote1 by quote2, I can compile the center project, but when I want to upload, I get:

    "Some of the HEX files have overlapping data."

    So I guess, that there needs to be a merge of settings between both quoted blocks, but as I do not know, what the meaning specific entries is, I'm quite lost here.

    Best regards,

    Richard

  • Hello Richard,

    Maybe I misunderstood what you meant, but SDK 17.0.2 does not include a 'PCA10056e' configuration for the ble_app_uart_c example in \examples\ble_central\.

    Anyway. I have made a "pca10056e" project now that you may try: pca10056e.zip

    Just keep in mind that it's not thoroughly tested. I only made sure it didn't trigger any code assertions on startup.

    Best regards,

    Vidar

Related