The S132 v5.1.0 is now production tested on nRF52810

This blog describes how you can setup a Segger Embedded Studio example for PCA10040E (emulating nRF52810) from nRF5 SDK 14.2 to use S132 v5.1.0, instead of S112. The procedure should be similar for the other toolchains.

nRF5 SDK 14.2 officially supports S132 v5.0.0, but since it is drop-in compatible, you can use S132 v5.1.0 instead of S132 v5.0.0 for nRF5 SDK 14.2. Simply flash s132_nrf52_5.1.0_softdevice.hex instead of s132_nrf52_5.0.0_softdevice.hex. s132_nrf52_5.1.0_softdevice.hex can be downloaded here.

The ble_app_uart_pca10040e_s112 example will be used as a starting point. This is chosen because it is one of the smaller Bluetooth Low Energy examples, the larger ones may not fit in the nRF52810 flash.

  1. Open \examples\ble_peripheral\ble_app_uart\pca10040e\s112\ses\ble_app_uart_pca10040e_s112.emProject
  2. Change the SoftDevice to be flashed together with the application from s112_nrf52810_5.1.0_softdevice.hex to s132_nrf52_5.1.0_softdevice.hex (you must download this). Under Project Items, right click on Project ‘ble_app_uart_pca10040e_s112’ and click Edit Options. Click on Loader under Debug and change the file pointed to after Additional Load File[0].
  3. Change the Flash start address and size to 0x23000 and 0xD000 (0x23000 is the size of the S132 v5.1.0 SoftDevice, the total flash size is 0x30000, so you are left with 0xD000). Under Project Items, right click on Project ‘ble_app_uart_pca10040e_s112’ and click Edit Options. Select Common in the top left corner. Click Linker. On Section Placement Macros set FLASH_START=0x23000 and FLASH_SIZE=D000.
  4. Change S112 to S132 in preprocessor symbols. Under Project Items, right click on Project ‘ble_app_uart_pca10040e_s112’ and click Edit Options. Select Common in the top left corner. Click Preprocessor. On Preprocessor Definitions change S112 to S132.
  5. Include the S132 headers. Under Project Items, right click on Project ‘ble_app_uart_pca10040e_s112’ and click Edit Options. Select Common in the top left corner. Click Preprocessor. On User Include Directories change:
    1. ../../../../../../components/softdevice/s112/headers to ../../../../../../components/softdevice/s132/headers
    2. ../../../../../../components/softdevice/s112/headers/nrf52 to ../../../../../../components/softdevice/s132/headers/nrf52
  6. Set the correct RAM start address and size. Compile the project and go into debug. Run. The debug terminal should say that the RAM start address can be set to 0x200025D0 and the size can be set to 0xDA30. 0xDA30 is not correct (its for the nRF52832), it should be 0x3A30. Under Project Items, right click on Project ‘ble_app_uart_pca10040e_s112’ and click Edit Options. Select Common in the top left corner. Click Linker. On Section Placement Macros set RAM_START=0x200025D0 and RAM_SIZE=3A30.
  7. Compile the project and go into debug. Run. The debug terminal should say <info> app: UART Start! and everything should work.

If you get into trouble, please post a question in the Q&A section and link to this blog.

For more information on developing on nRF52810, see this.

Parents Comment Children