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

Programming guide for nrf5 SDK

I'm starting to read all the resources and examples included in the SDK. However, there doesn't seem to be a lot of emphasis on explaining how the programming architecture works (ie. event driven, task driven, or what).

A lot of the tutorials and examples simply show you how to compile and run one of the SDK examples. Is there any documentation that explains how one would create their own application entirely from scratch?

This would probably help in understanding the underlaying code in examples rather than just taking an example and adding on custom code.

Parents
  • In tutorial section of this forum there are 4 guides to Bluetooth Low Energy (in the middle of the page, starting with the advertisement explanation and exercises). I believe that's what you describe. By reading the code of these examples and following code snippets and exercises you should get glimps how Nordic BLE stack work and what "standard application architecture" is on top of that. If you decide to go with Nordic BLE stack (note that there are other options so that might be the reason why there is no authoritative guide to app's architecture = it depends on the radio stack) then you can see many sequence diagrams including basic flow charts of thread vs. interrupt driven event retrieval architectures on Infocenter. There are also several "project templates" in the nRF5 SDK which should be "the master architecture" example if you decide to go with nRF5 SDK and Nordic BLE stacks (Soft Device).

    If anything missing could you be more specific? E.g. by linking some other examples from different embedded architectures and SDKs...

  • Yes, most of us never really access registers directly, all standard things like BLE, UART/SPI/I2C, scheduler, RTC based timer etc. are provided in decent libraries and drivers. So once you figer the optimal event driven architecture then you are fine for 90% of projects. The problems start when you want to push nRF52 to the limits, because chip itself is pretty powerful but not all things are 100% utilized in SDK or are not working smoothly when all merged into one complex project. BUT that's absolutely normal and again I can say that Nordic SDK is above industry standard in this sense as well (try to do this with NXP LPC series or STM32, you will be in the same situation: if you want to push the platform to the limit you need to have very deep knowledge of it and hands-on experience in range of 6+ months)

Reply
  • Yes, most of us never really access registers directly, all standard things like BLE, UART/SPI/I2C, scheduler, RTC based timer etc. are provided in decent libraries and drivers. So once you figer the optimal event driven architecture then you are fine for 90% of projects. The problems start when you want to push nRF52 to the limits, because chip itself is pretty powerful but not all things are 100% utilized in SDK or are not working smoothly when all merged into one complex project. BUT that's absolutely normal and again I can say that Nordic SDK is above industry standard in this sense as well (try to do this with NXP LPC series or STM32, you will be in the same situation: if you want to push the platform to the limit you need to have very deep knowledge of it and hands-on experience in range of 6+ months)

Children
No Data
Related