Statistics
| Branch: | Tag: | Revision:

mongoose / examples / STM32F4_CC3100 @ eaef5bd1

Name Size Revision Age Author Comment
Makefile 255 Bytes eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
Makefile.build 2.79 KB eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
README.md 2.63 KB eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
main.c 4.05 KB eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
sdk.version 67 Bytes eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
startup_stm32f429xx.s 25.7 KB eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
startup_utils.c 824 Bytes eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
stm32f429xx.ld 1.57 KB eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
stm32f4xx_hal_msp.h 2.35 KB eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
user_params.h 506 Bytes eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...

Latest revisions

# Date Author Comment
eaef5bd1 02/06/2017 02:08 PM Alexander Alashkin

Revert "Stop publish examples to mongoose repo"

This reverts commit 1a17e17c462bdd4e1d26d8742f8b7087273e04c2.

PUBLISHED_FROM=80028de308c9a021955d1425d2bfee8feb85f193

551f393d 02/03/2017 10:17 AM Alexander Alashkin

Remove examples

807e4ea6 01/30/2017 12:09 PM Alexander Alashkin

Fix STM32F4_CC3100 Mongoose example compilation

PUBLISHED_FROM=7a67a67d2f0007e241e4ccb57bc24a43ba20bfde

618bef0e 10/14/2016 08:37 AM Marko Mikulicic

Fix stm32f4_cc311 example and add it to CI

The build has been broken because MQTT has been disabled during some refactoring
but never caught because this example was never built on CI.

PUBLISHED_FROM=b67051ff948f1ac89448fc707f41cdf5d48cdaaf

5f93f716 09/05/2016 03:06 PM Alexander Alashkin

Add STM32F4/CC3100 example & Co

PUBLISHED_FROM=7f805d89dcb795c9b3ee637ef1dbdcfcf3323469

View revisions

README


STM32F4 example project

This example shows how to use mongoose on STM32 boards. To run it you will need: - STM32F429-Discovery dev board - CC3100 WiFi network processor

Wiring scheme

By default, example uses SPI4 for communication with CC3100 and UART1 for the debug output. All parameters are described in file stm32f4xx_hal_msp.h, they can be changed to use another SPI and/or UART

To use default scheme connect (CC3100 -> STM32-DISCO) connect: DO -> PE5 DIN -> PE6 CLK -> PE2 CS -> PB12 IRQ -> PA0 HIB -> PB0

Building firmware

Change user_params.h, put correct WiFi SSID and password there, also change MQTT_BROKER_ADDRESS to the real broker address.

make in mongoose/STM32F4_CC3100 will download required docker image and make firmware. Result will be in STM32F4_CC3100/out folder.

Uploading firmare

Uploading firmware method depends on how you connected STM32 board to your computer. If it is connected via USB ST-LINK connected it is appears as a flash drive and in order to upload firmware just copy out/example.bin to that drive.

Running

Compile two additional samples: mqtt_broker and mqtt_client and run them in different terminals. Press reset (or repower) STM board. The board will connect to broker and will start to publish its uptime in /stuff channel. mqtt_client is subscribed on this channel as well, so it should start to print

``` Got incoming message /stuff: Current tick: 99000 Forwarding to /test Got incoming message /stuff: Current tick: 100120 Forwarding to /test Got incoming message /stuff: Current tick: 101250 Forwarding to /test ...

```

If you connect UART to serial port monitor (pin PA9 or ST-LINK device, like /dev/ttyACM0) you should see device output: ``` **** Hello **** Initializing CC3100 on SPI4 Starting WiFi connect Done, waiting for events Connected to WiFi Got IP Connected to 192.168.1.108:1883 Connected to broker Subscribing to /test Subscription acknowledged Publishing message with tick=1 Got incoming message /test: Current tick: 4487 Publishing message with tick=2 Got incoming message /test: Current tick: 5597 Publishing message with tick=3 Got incoming message /test: Current tick: 6717 ...

```

This output looks like this because the device sends messages Current tick: .... into /stuff channel, mqtt_client receives all messages in this channel and sends them to /test channel. But the device is subscribed to this channel so, it receives it back.

Also available in: Atom