Skip to content

Commit

Permalink
docs(*): add project_description.md
Browse files Browse the repository at this point in the history
move some chapters from README.md to project_description.md
  • Loading branch information
gemesa committed Apr 18, 2020
1 parent 2ff3627 commit f25e1f7
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 33 deletions.
36 changes: 3 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ A similar, Arduino libraries based design by **cpixip** can be found at [forum.a
- STM32CubeMX,
- STM32 HAL.

A detailed description can be found in [docs/project_description.md](docs/project_description.md).

## Prerequisites

The prerequisites and the toolchain are detailed in [Mastering STM32](https://leanpub.com/mastering-stm32) written by **Carmine Noviello**.
Expand Down Expand Up @@ -48,39 +50,7 @@ Measurement results can be found in the [meas](meas) folder.

## Deployment

The basic configuration has to be generated with STM32CubeMX. The following peripherals have to be configured:
- UART - USB-UART adapter <-- Blue Pill
- SPI - Blue Pill <--> nRF24L01+
- TIM - required for delay function
- GPIO - required for CE, SS and LED pins

The `blue_pill_config.ioc` project file and the generated source code can be found at [config/cubemx](config/cubemx). An STM32F1xx C project has to be created in Eclipse after this. All instructions can be found in the mentioned book. The files generated by CubeMX have to be copied to the proper folders of the Eclipse project manually or by running [tools/cubemx_importer.py](tools/cubemx_importer.py):

```
python cubemx_importer.py <eclipse_project_path> <cubemx_project_path> [<stm32doxyfile_path>]
```

The STM32F103xB macro has to be defined and the Eclipse project can be built after this. If the compilation of the base configuration is successful we can add our functionality to the main function.

Add the includes to main.c:
```c
#include "util.h"
#include "wifi_scanner.h"
```

Add the init function calls:
```c
util_init();
wifi_scanner_init();
```

Add the step and blink function calls to the while loop:
```c
wifi_scanner_step();
blink_led();
```

The blinking LED indicates whether the SW runs or not. Compile the code and download the binary to the Blue Pill. Connect the configured pins to the nRF24L01+. Run the SW. The results can be read with an USB-UART adapter.
Build the SW using Eclipse and GCC ARM. Download the binary with STM32CubeProgrammer or OpenOCD and GDB ARM.

## License

Expand Down
61 changes: 61 additions & 0 deletions docs/project_description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Project description

This document contains the detailed project description.

## STM32CubeMX

The basic configuration has to be generated with STM32CubeMX. The following peripherals have to be configured:
- UART - USB-UART adapter <-- Blue Pill
- SPI - Blue Pill <--> nRF24L01+
- TIM - required for delay function
- GPIO - required for CE, SS and LED pins

The `blue_pill_config.ioc` project file and the generated source code can be found at [config/cubemx](config/cubemx).

## Eclipse

An STM32F1xx C project has to be created using the STM32 project templates. All instructions can be found in [Mastering STM32](https://leanpub.com/mastering-stm32). The files generated by CubeMX have to be copied to the proper folders of the Eclipse project manually or by running [tools/cubemx_importer.py](tools/cubemx_importer.py):

```
python cubemx_importer.py <eclipse_project_path> <cubemx_project_path> [<stm32doxyfile_path>]
```

The STM32F103xB macro has to be defined (necessary for building). The functionality is added to the main function.

Includes:
```c
#include "util.h"
#include "wifi_scanner.h"
```

Init functions:
```c
util_init();
wifi_scanner_init();
```

Step functions:
```c
wifi_scanner_step();
blink_led();
```

## Building

Compile and link the code in the Eclipse GUI or by calling `eclipsec.exe` with the proper arguments from command line.

## Downloading

The binary file can be downloaded using STM32CubeProgrammer or OpenOCD and GDB ARM.

## Measurement

The measured data is sent out via UART and can be observed with an USB-UART adapter.

The UART parameters:
- baud rate: 115200bits/s
- word length: 8 bits (including parity)
- parity: none
- stop bits: 1

Measurement results are stored in the [meas](meas) folder.

0 comments on commit f25e1f7

Please sign in to comment.