wifi test

Dependencies:   X_NUCLEO_IKS01A2 mbed-http

Committer:
JMF
Date:
Wed Sep 05 14:28:24 2018 +0000
Revision:
0:24d3eb812fd4
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JMF 0:24d3eb812fd4 1 Getting Started with Contiki for STM32 Nucleo equipped with sub-1GHz SPIRIT1 expansion boards
JMF 0:24d3eb812fd4 2 =============================================================================================
JMF 0:24d3eb812fd4 3
JMF 0:24d3eb812fd4 4 This guide explains how to get started with the STM32 Nucleo and expansion boards port to Contiki.
JMF 0:24d3eb812fd4 5
JMF 0:24d3eb812fd4 6 Port Feature
JMF 0:24d3eb812fd4 7 ============
JMF 0:24d3eb812fd4 8
JMF 0:24d3eb812fd4 9 The port supports the following boards from ST:
JMF 0:24d3eb812fd4 10 - NUCLEO-L152RE board, based on the STM32L152RET6 ultra-low power microcontroller
JMF 0:24d3eb812fd4 11 - X-NUCLEO-IDS01A4 based on sub-1GHz SPSGRF-868 SPIRIT1 module (operating at 868 MHz)
JMF 0:24d3eb812fd4 12 - X-NUCLEO-IDS01A5 based on sub-1GHz SPSGRF-915 SPIRIT1 module (operating at 915 MHz)
JMF 0:24d3eb812fd4 13 - X-NUCLEO-IKS01A1 featuring motion MEMS and environmental sensors (optional)
JMF 0:24d3eb812fd4 14
JMF 0:24d3eb812fd4 15 The following drivers are included:
JMF 0:24d3eb812fd4 16 - LEDs and buttons (user, reset)
JMF 0:24d3eb812fd4 17 - USB
JMF 0:24d3eb812fd4 18 - SPIRIT1 sub-1GHz transceiver
JMF 0:24d3eb812fd4 19 - HTS221, LIS3MDL, LPS25HB, LSM6DS0 sensors
JMF 0:24d3eb812fd4 20
JMF 0:24d3eb812fd4 21
JMF 0:24d3eb812fd4 22 Hardware Requirements
JMF 0:24d3eb812fd4 23 =====================
JMF 0:24d3eb812fd4 24
JMF 0:24d3eb812fd4 25 * NUCLEO-L152RE development board
JMF 0:24d3eb812fd4 26
JMF 0:24d3eb812fd4 27 >The NUCLEO-L152RE board belongs to the STM32 Nucleo family.
JMF 0:24d3eb812fd4 28 It features an STM32L152RET6 ultra-low power microcontroller based on ARM Cortex M3 MCU.
JMF 0:24d3eb812fd4 29 Detailed information on the NUCLEO-L152RE development board can be found at:
JMF 0:24d3eb812fd4 30 http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260002
JMF 0:24d3eb812fd4 31
JMF 0:24d3eb812fd4 32
JMF 0:24d3eb812fd4 33 * X-NUCLEO-IDS01Ax sub-1GHz expansion board
JMF 0:24d3eb812fd4 34
JMF 0:24d3eb812fd4 35 >The X-NUCLEO-IDS01A4 and X-NUCLEO-IDS01A5 are STM32 Nucleo expansion boards that use
JMF 0:24d3eb812fd4 36 the module SPSGRF-868 or SPSGRF-915 based on SPIRIT1 low data rate, low power sub-1 GHz transceiver.
JMF 0:24d3eb812fd4 37
JMF 0:24d3eb812fd4 38 >The user can select the X-NUCLEO-IDS01A4 board to operate the SPIRIT1 transceiver at 868MHz or the X-NUCLEO-IDS01A5 board to operate the SPIRIT1 transceiver at 915MHz.
JMF 0:24d3eb812fd4 39
JMF 0:24d3eb812fd4 40 >Detailed information on the X-NUCLEO-IDS01A4 expansion board can be found at:
JMF 0:24d3eb812fd4 41 http://www.st.com/web/catalog/tools/FM146/CL2167/SC2006/PF261982
JMF 0:24d3eb812fd4 42
JMF 0:24d3eb812fd4 43 >Detailed information on the X-NUCLEO-IDS01A5 expansion board can be found at:
JMF 0:24d3eb812fd4 44 http://www.st.com/web/catalog/tools/FM146/CL2167/SC2006/PF261983
JMF 0:24d3eb812fd4 45
JMF 0:24d3eb812fd4 46 >Detailed information on the SPIRIT1 sub-1GHz transceiver can be found at:
JMF 0:24d3eb812fd4 47 http://www.st.com/web/catalog/sense_power/FM2185/SC1845/PF253167
JMF 0:24d3eb812fd4 48
JMF 0:24d3eb812fd4 49 * X-NUCLEO-IKS01A1, motion MEMS and environmental sensors expansion board (OPTIONAL)
JMF 0:24d3eb812fd4 50
JMF 0:24d3eb812fd4 51 >The X-NUCLEO-IKS01A1 is a motion MEMS and environmental sensor evaluation board.
JMF 0:24d3eb812fd4 52 The use of this board is optional in the stm32nucleo-spirit1 Contiki platform.
JMF 0:24d3eb812fd4 53
JMF 0:24d3eb812fd4 54 >Detailed information on the X-NUCLEO-IKS01A1 expansion board can be found at:
JMF 0:24d3eb812fd4 55 http://www.st.com/web/catalog/tools/FM146/CL2167/SC2006/PF261191
JMF 0:24d3eb812fd4 56
JMF 0:24d3eb812fd4 57
JMF 0:24d3eb812fd4 58 * USB type A to Mini-B USB cable, to connect the STM32 Nucleo board to the PC
JMF 0:24d3eb812fd4 59
JMF 0:24d3eb812fd4 60 Software Requirements
JMF 0:24d3eb812fd4 61 =====================
JMF 0:24d3eb812fd4 62
JMF 0:24d3eb812fd4 63 The following software are needed:
JMF 0:24d3eb812fd4 64
JMF 0:24d3eb812fd4 65 * ST port of Contiki for STM32 Nucleo and expansion boards.
JMF 0:24d3eb812fd4 66
JMF 0:24d3eb812fd4 67 >The port is automatically installed when both the Contiki and the submodule repository are cloned: the former hosts the Contiki distribution and the ST platform interface, the latter hosts the actual library. The following commands are needed to download the full porting:
JMF 0:24d3eb812fd4 68
JMF 0:24d3eb812fd4 69 git clone https://github.com/STclab/contiki.git
JMF 0:24d3eb812fd4 70 cd contiki/
JMF 0:24d3eb812fd4 71 git checkout stm32nucleo-spirit1
JMF 0:24d3eb812fd4 72 git submodule init
JMF 0:24d3eb812fd4 73 git submodule update
JMF 0:24d3eb812fd4 74
JMF 0:24d3eb812fd4 75
JMF 0:24d3eb812fd4 76 Note: the first and third steps are required only if using the STclab GitHub repository, they won't be needed any more once the Pull Request is accepted.
JMF 0:24d3eb812fd4 77
JMF 0:24d3eb812fd4 78 The platform name is: stm32nucleo-spirit1
JMF 0:24d3eb812fd4 79
JMF 0:24d3eb812fd4 80 * A toolchain to build the firmware: The port has been developed and tested with GNU Tools
JMF 0:24d3eb812fd4 81 for ARM Embedded Processors.
JMF 0:24d3eb812fd4 82 >The toolchain can be found at: https://launchpad.net/gcc-arm-embedded
JMF 0:24d3eb812fd4 83 The port was developed and tested using this version: gcc-arm-none-eabi v4.8.3
JMF 0:24d3eb812fd4 84
JMF 0:24d3eb812fd4 85
JMF 0:24d3eb812fd4 86 Examples
JMF 0:24d3eb812fd4 87 ========
JMF 0:24d3eb812fd4 88
JMF 0:24d3eb812fd4 89 The following examples have been successfully tested:
JMF 0:24d3eb812fd4 90
JMF 0:24d3eb812fd4 91 * examples/stm32nucleo-spirit1/sensor-demo
JMF 0:24d3eb812fd4 92 * examples/ipv6/simple-udp-rpl (multicast, rpl-border-router, simple-udp-rpl)
JMF 0:24d3eb812fd4 93
JMF 0:24d3eb812fd4 94
JMF 0:24d3eb812fd4 95 Build an example
JMF 0:24d3eb812fd4 96 ================
JMF 0:24d3eb812fd4 97 In order to build an example go to the selected example directory (see a list of tested
JMF 0:24d3eb812fd4 98 examples in the previous section).
JMF 0:24d3eb812fd4 99
JMF 0:24d3eb812fd4 100 For example, go to examples/ipv6/simple-udp-rpl directory.
JMF 0:24d3eb812fd4 101
JMF 0:24d3eb812fd4 102
JMF 0:24d3eb812fd4 103 If the X-NUCLEO-IDS01A4 sub-1GHz RF expansion board is used, the following must be run:
JMF 0:24d3eb812fd4 104
JMF 0:24d3eb812fd4 105 make TARGET=stm32nucleo-spirit1 USE_SUBGHZ_BOARD=IDS01A4 clean
JMF 0:24d3eb812fd4 106 make TARGET=stm32nucleo-spirit1 USE_SUBGHZ_BOARD=IDS01A4
JMF 0:24d3eb812fd4 107
JMF 0:24d3eb812fd4 108 If the X-NUCLEO-IDS01A5 sub-1GHz RF expansion board is used, the following must be run:
JMF 0:24d3eb812fd4 109
JMF 0:24d3eb812fd4 110 make TARGET=stm32nucleo-spirit1 USE_SUBGHZ_BOARD=IDS01A5 clean
JMF 0:24d3eb812fd4 111 make TARGET=stm32nucleo-spirit1 USE_SUBGHZ_BOARD=IDS01A5
JMF 0:24d3eb812fd4 112
JMF 0:24d3eb812fd4 113
JMF 0:24d3eb812fd4 114 This will create executables for UDP sender and receiver nodes.
JMF 0:24d3eb812fd4 115
JMF 0:24d3eb812fd4 116 In order to generate binary files that can be flashed on the STM32 Nucleo the following command must be run:
JMF 0:24d3eb812fd4 117
JMF 0:24d3eb812fd4 118 arm-none-eabi-objcopy -O binary unicast-sender.stm32nucleo-spirit1 unicast-sender.bin
JMF 0:24d3eb812fd4 119 arm-none-eabi-objcopy -O binary unicast-receiver.stm32nucleo-spirit1 unicast-receiver.bin
JMF 0:24d3eb812fd4 120
JMF 0:24d3eb812fd4 121 These executables can be programmed on the nodes using the procedure described hereafter.
JMF 0:24d3eb812fd4 122
JMF 0:24d3eb812fd4 123
JMF 0:24d3eb812fd4 124 In case you need to build an example that uses the additional sensors expansion board
JMF 0:24d3eb812fd4 125 (for example, considering a system made of NUCLEO-L152RE, X-NUCLEO-IDS01A4 and X-NUCLEO-IKS01A1)
JMF 0:24d3eb812fd4 126 then the command to be run would be:
JMF 0:24d3eb812fd4 127
JMF 0:24d3eb812fd4 128 make TARGET=stm32nucleo-spirit1 USE_SUBGHZ_BOARD=IDS01A4 USE_SENSOR_BOARD=1
JMF 0:24d3eb812fd4 129
JMF 0:24d3eb812fd4 130 System setup
JMF 0:24d3eb812fd4 131 ============
JMF 0:24d3eb812fd4 132
JMF 0:24d3eb812fd4 133 1. Check that the jumper on the J1 connector on the X-NUCLEO-IDS01Ax expansion board is connected.
JMF 0:24d3eb812fd4 134 This jumper provides the required voltage to the devices on the board.
JMF 0:24d3eb812fd4 135
JMF 0:24d3eb812fd4 136 2. Connect the X-NUCLEO-IDS01Ax board to the STM32 Nucleo board (NUCLEO-L152RE) from the top.
JMF 0:24d3eb812fd4 137
JMF 0:24d3eb812fd4 138 3. If the optional X-NUCLEO-IKS01A1 board is used, connect it on top of the X-NUCLEO-IDS01Ax board.
JMF 0:24d3eb812fd4 139
JMF 0:24d3eb812fd4 140 4. Power the STM32 Nucleo board using the Mini-B USB cable connected to the PC.
JMF 0:24d3eb812fd4 141
JMF 0:24d3eb812fd4 142 5. Program the firmware on the STM32 Nucleo board.
JMF 0:24d3eb812fd4 143 This can be done by copying the binary file on the USB mass storage that is
JMF 0:24d3eb812fd4 144 automatically created when plugging the STM32 Nucleo board to the PC.
JMF 0:24d3eb812fd4 145
JMF 0:24d3eb812fd4 146 6. Reset the MCU by using the reset button on the STM32 Nucleo board
JMF 0:24d3eb812fd4 147
JMF 0:24d3eb812fd4 148
JMF 0:24d3eb812fd4 149
JMF 0:24d3eb812fd4 150
JMF 0:24d3eb812fd4 151
JMF 0:24d3eb812fd4 152
JMF 0:24d3eb812fd4 153
JMF 0:24d3eb812fd4 154
JMF 0:24d3eb812fd4 155