Starting Software From Scratch (SSv5)

This page describes the steps that could be followed to recreate this software project from scratch on the sensor node.

Installing Software Components

These steps can be followed to make sure all the necessary software components are installed.

  1. Get a bootloader on your device (you will not be able to download firmware on your chip before doing this). One quick and easy way to do this is to load a 'Demo' onto your board - this will flash both the bootloader (which doesn't go away) and the application. I like to choose the 'Thermometer Demo' because you can use EFR Connect App on your phone and make sure that the board Bluetooth and peripheral functions are working properly.
    1. From the home screen, make sure your board is plugged in and press "Start". recreate1.png
    2. On the next tab, navigate to "Example Projects and Demos". You will also get a glimpse of the many empty projects you could use to start, including "Empty Bluetooth SoC" (which I build the rest of the project on) and "Bluetooth Mesh SoC Server", which you could use in the future to implement a mesh network. recreate2.png
    3. To quickly find the Thermometer demo, turn off the "Example Projects" slider and then run the Thermometer demo. recreate3.png
  2. After you have the bootloader loaded, create a new project using the "Bluetooth - SoC Empty" example.
  3. Navigate to the file [your project name].slcp, and under the "Software Components" tab at the top, install the following components:
    • USTIMER (this allows you to create delays)
    • IO Stream: SWO (this enables printing to the console)
      • This is also a good time to go into the pintool and assign PA01 as GPIO_SWCLK and PA02 as GPIO_SWDIO (PA03 should already be assigned to GPIO_SWV).
    • GPIOINT
    • PRS
    • Toolchain: C++ Support
    • IADC (you will eventually need this for the RTD - temperature sensor)
    • PDM
    • PDM Microphone - When the Configure option is available after it has installed, initialize an instance in the "Configure" tab with the following parameters:
      • Selected Module = PDM
      • CLK = PB04
      • DAT0 = PA00
      • DAT1 = None (this would be non-empty if you were using 2 microphones for a binaural application).
      • Custom Peripheral Name = im69d130
    • SPIDRV Core
    • SPIDRV - When the Configure option is available after it has installed, initialize an instance with the following parameters:
      • Instance name = kx134_1211
      • SPI bitrate =
      • SPI frame length =
      • SPI mode = Master
      • Bit order on the SPI bus = MSB transmitted first
      • SPI clock mode = SPI mode 0
      • SPI master chip select control scheme = CS controlled by SPI driver
      • SPI slave transfer start scheme = Transfer starts immediately
      • SL_SPIDRV_XK134_1211:
        • Selected module = USART0
        • CLK = PA05
        • CS = PA06
        • CTS = None
        • RTS = None
        • RX = PA07
        • TX = PA08
        • USART Custom Peripheral Name = [I just leave this blank]
  4. Now it's time to bring in the folder and files from Github.
  5. You'll need to add these folders to the path. To do this, go into Project>Properties, and in the new window, navigate to C/C++ General>Paths and Symbols>Includes. Go to the GNU C++ linker and add the paths to all extra folders that you have added to your project ("Needed for printf" and "Testing functions" come to mind).
    • adding_paths.PNG
  6. Your final pintool will look something like this:
brd4182_pintool.PNG

Testing your New Configuration

Make sure you can print to the console. Make sure your advertising is showing up on the EFR Connect App. If these both work, you should be good to continue development.

Grabbing Code from Github

All my code for this project is on Github under https://github.com/revvyrouser/SSMachMo_v0_BRD4182. You will not be able to access this link until you have been granted contributor access, so make sure you email/message me and I'll add you right away.

Import this project into Simplicity Studios and you should be good to continue this project.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License