[SOLVED] Nordicsemi NRF52840 SysTICK implementation for EMBOS.

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Nordicsemi NRF52840 SysTICK implementation for EMBOS.

    Hi.

    I am trying to port embOS to nordic nrf52840 SDK 17.0.2.
    I took for the base Nordic SDK project UART (peripheral example without Soft Device). Added embOS library and it started to work: only OS with peripheral drivers.
    Now I am working to add a Soft Device - part of BLE code. I see that Nrf for FreeRTOS for SysTick uses the RTC timer from 32kHz (define FREERTOS_USE_RTC with using RTC1_IRQHandler.
    I found in embOS #define OS_TIMER_FREQ (SystemCoreClock).

    Questions:
    1. Did somebody test the embOS with Ble(SOFT DEVICE) and with System Core Clock?
    2. Do you have example or somebody else implemented for "app_timer" for Nordic SDK (API between BLE and OS timers)?
    3. Do you have some tips for me about the porting to NRF? May be I didn't found in forum the porting sequence from somebody else?

    Thanks.

    The post was edited 1 time, last by vadymsodolevsky ().

  • Dear vadymsodolevsky,

    Thank you for your inquiry.

    vadymsodolevsky wrote:

    1. Does somebody tested the embOS with Ble(SOFT DEVICE) and with System Core Clock?
    2. Do you have example or somebody else implemented for "app_timer" for Nordic SDK (API between BLE and OS timers)?
    3. Do you have some tips for me about the porting to NRF? May be I didn't found in forum the porting sequence from somebody else?
    After receiving some customer requests on this topic, we've performed several tests some time ago to see whether any modifications need to be done to embOS or to our BSPs in order to use those with Nordic's softdevices.
    Eventually, we've found embOS to be fully compatible, while two minor modifications were required to our BSPs only (+ a third one when working with very old versions of our BSPs). We've documented those changes to the BSPs at:
    wiki.segger.com/Using_embOS_with_Nordic_BLE

    Please be aware that our tests had been done using SDK version 12.2.0. However, I'm not aware of any changes to the SDK that would have broken compatibility between embOS and Nordic's softdevices.
    Specifically, working with SystemCoreClock did work flawlessly during our tests. Are you experiencing any issue when working with it? If so, can you describe that in more detail?

    Best regards,
    Martin
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Dear Martin.
    Thank you for answer.

    I don't understand something.
    As I know, the SoftDevice is a part of BLE stack, it should be programmed as hex image before debugging and it should be placed from beginning of the ROM. It also takes the part of RAM depends from BLE SDK configuration and used modules.

    What is the easiest way to use embOS with NRF soft device? I see 2 options:
    1. Use as the base the embOS IAR project (with the 3 changes), remapping the application, add BLE component to work with SoftDevice?
    2. Use the NRF SDK, add embOS as SW library and adopt the project to work with it in the same way as FreeRTOS works? (currently chosen)

    Please, correct me if I am wrong about something and what is the proffered way to use embOS with SoftDevice and BLE libraries.
  • Hi vadymsodolevsky,

    vadymsodolevsky wrote:

    What is the easiest way to use embOS with NRF soft device? I see 2 options:
    1. Use as the base the embOS IAR project (with the 3 changes), remapping the application, add BLE component to work with SoftDevice?
    2. Use the NRF SDK, add embOS as SW library and adopt the project to work with it in the same way as FreeRTOS works? (currently chosen)

    Both options would work, of course. However, option 2) probably is more easy to perform, since integrating embOS into an existing project is quite straightforward and requires few modifications only (including the libs and RTOSInit.c, configuring appropiate include paths and ultimately creating a task that executes the superloop of the existing bare-metal application). Integrating the softdevice into an existing embOS project, on the other hand, will likely require some more modifications (e.g. adding the additional hex file, appropriately configuring the project and linker files, writing the application from scratch, etc.).

    As a reference on option 2), I will provide you with the aforementioned project that we had created based on SDK version 12.2.0. Please check your inbox for the download link in a few minutes.

    Best regards,
    Martin
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.