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

nRF52832 and STM32 Serialization Build: Do I include the Soft-Device Handler?

I'm working on a project that will utilize the nRF52832 as the Host and Controller and an STM32F3 as the application using serialization.

I've included the nRF5 SDK V14 into my project and slowly been modifying includes and compile defines to get a functioning build. I understand that I'll have to load the S132 soft-device onto the nRF52832 along with one of the example UART Serialization applications and then use the nRF5 SDK to build an application for the STM32 that can communicate to the nRF chip.

Looking at the examples listed here and referencing the Heart Rate Application example I'm making progress.

My biggest question so far is related to the Soft-Device Handler and whether I need to include it in my project:

I didn't think I should include the 'components/device' and 'components/softdevice/common' directories as it includes definitions for the nRF chip and softdevice; I'm trying to implement an application on the STM32F3 (so I shouldn't need the nRF chip definitions) that doesn't include the softdevice (so I shouldn't need the soft-device handler files 'nrf_sdh_ble' etc).

As an example, some of the functions in 'nrf_sdh_ble.c' require access to nrf definitions (like ram_end_address_get() trying to determine the total ram size by checking NRF_FICR which doesn't exist on the STM32).

Do I need to include the Soft-Device Handler for the Application firmware or should I re-implement it's functionality (re-write ram_end_address_get() etc for the STM32)?

  • Hi,

    In _sd_ble_enable() the p_app_ram_base is ignored, so it should be safe to just comment out the NRF_FICR part of the code. Are there more of these issues with the nrf_sdh library ? The nrf_sdh library is an API library for initializing and disabling the SoftDevice, it's not very big, and it should not be a big problem to port this to the STM32.

    STM have an application note on Serialization here you might want to take a look at.

Related