6 years, 6 months ago.

nRF52832 - Using SDK and mbed?

Hi,

I'm working with mbed and the nRF52832 platform. I'm trying to use the Nordic SDK included with mbed to do some more advanced tasks and optimizing them using the Nordic's PPI. Basically I need more control over the ADC and some other peripherals.

I've been having a hard time getting mbed to play nicely with the underlying SDK. I have disabled AnalogIn for my custom target and used Nordic's documentation to create a PPI link between a Timer and the SAADC's sample task

This allows me to control sample rate more precisely, which is important for my application.

Where could the conflict lie? I am using mbed with the S132 soft device.

Are there any examples of using the Nordic SDK with mbed? What hardware resources should be reserved for use by mbed?

1 Answer

6 years, 6 months ago.

The Nordic SDK is used by all Nordic targets in mbed. All NRF52 source is contained here - https://github.com/ARMmbed/mbed-os/tree/master/targets/TARGET_NORDIC/TARGET_NRF5

You can see which version of the SDK is used here -https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json#L3010

It is SDK 11, located here - https://github.com/ARMmbed/mbed-os/tree/master/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK11

I have read through some of the code there. Are there no guidelines on what hardware peripherals are initialized and used by mbed for internal operations (ie: RTOS threading)? I have a fear that I will be reconfiguring something that is critical for the correct operation of mbed.

For example, Nordic has a section of their softdevice documentation where they outline what peripherals should not be reconfigured to maintain stability of the softdevice operation.

posted by George Beckstein 27 Sep 2017

So, there isn't really an established doc. But all of the startup/boot code would be a good jumping off point. I would suggest looking into the boot sequence here- https://github.com/ARMmbed/mbed-os/blob/master/rtos/TARGET_CORTEX/mbed_boot.c#L33-L53. You can go through those functions to better understand what is being initialized.

I would say messing with ADC would not affect the RTOS, but that is the place to look if you are concerned.

posted by Sarah Marsh 27 Sep 2017

That was a really lousy response.

posted by Taylor Street 02 May 2018