CMSIS libraries example to DAC output of NUCLEO boards (that have them e.g F429ZI) to an Oscilloscope to display frequency domain bins

Dependencies:   mbed-dsp

Committer:
martinsimpson
Date:
Fri Apr 13 08:59:47 2018 +0000
Revision:
0:05e2c9ca68e2
1st Commit; FFT using CMSIS libraries to generate a DAC output to a front end of a basic Oscilloscope to obseverve a FFT scan with bins (see code for resolution)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
martinsimpson 0:05e2c9ca68e2 1 # Getting started with Blinky on mbed OS
martinsimpson 0:05e2c9ca68e2 2
martinsimpson 0:05e2c9ca68e2 3 This guide reviews the steps required to get Blinky working on an mbed OS platform.
martinsimpson 0:05e2c9ca68e2 4
martinsimpson 0:05e2c9ca68e2 5 Please install [mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli).
martinsimpson 0:05e2c9ca68e2 6
martinsimpson 0:05e2c9ca68e2 7 ## Import the example application
martinsimpson 0:05e2c9ca68e2 8
martinsimpson 0:05e2c9ca68e2 9 From the command-line, import the example:
martinsimpson 0:05e2c9ca68e2 10
martinsimpson 0:05e2c9ca68e2 11 ```
martinsimpson 0:05e2c9ca68e2 12 mbed import mbed-os-example-blinky
martinsimpson 0:05e2c9ca68e2 13 cd mbed-os-example-blinky
martinsimpson 0:05e2c9ca68e2 14 ```
martinsimpson 0:05e2c9ca68e2 15
martinsimpson 0:05e2c9ca68e2 16 ### Now compile
martinsimpson 0:05e2c9ca68e2 17
martinsimpson 0:05e2c9ca68e2 18 Invoke `mbed compile`, and specify the name of your platform and your favorite toolchain (`GCC_ARM`, `ARM`, `IAR`). For example, for the ARM Compiler 5:
martinsimpson 0:05e2c9ca68e2 19
martinsimpson 0:05e2c9ca68e2 20 ```
martinsimpson 0:05e2c9ca68e2 21 mbed compile -m K64F -t ARM
martinsimpson 0:05e2c9ca68e2 22 ```
martinsimpson 0:05e2c9ca68e2 23
martinsimpson 0:05e2c9ca68e2 24 Your PC may take a few minutes to compile your code. At the end, you see the following result:
martinsimpson 0:05e2c9ca68e2 25
martinsimpson 0:05e2c9ca68e2 26 ```
martinsimpson 0:05e2c9ca68e2 27 [snip]
martinsimpson 0:05e2c9ca68e2 28 +----------------------------+-------+-------+------+
martinsimpson 0:05e2c9ca68e2 29 | Module | .text | .data | .bss |
martinsimpson 0:05e2c9ca68e2 30 +----------------------------+-------+-------+------+
martinsimpson 0:05e2c9ca68e2 31 | Misc | 13939 | 24 | 1372 |
martinsimpson 0:05e2c9ca68e2 32 | core/hal | 16993 | 96 | 296 |
martinsimpson 0:05e2c9ca68e2 33 | core/rtos | 7384 | 92 | 4204 |
martinsimpson 0:05e2c9ca68e2 34 | features/FEATURE_IPV4 | 80 | 0 | 176 |
martinsimpson 0:05e2c9ca68e2 35 | frameworks/greentea-client | 1830 | 60 | 44 |
martinsimpson 0:05e2c9ca68e2 36 | frameworks/utest | 2392 | 512 | 292 |
martinsimpson 0:05e2c9ca68e2 37 | Subtotals | 42618 | 784 | 6384 |
martinsimpson 0:05e2c9ca68e2 38 +----------------------------+-------+-------+------+
martinsimpson 0:05e2c9ca68e2 39 Allocated Heap: unknown
martinsimpson 0:05e2c9ca68e2 40 Allocated Stack: unknown
martinsimpson 0:05e2c9ca68e2 41 Total Static RAM memory (data + bss): 7168 bytes
martinsimpson 0:05e2c9ca68e2 42 Total RAM memory (data + bss + heap + stack): 7168 bytes
martinsimpson 0:05e2c9ca68e2 43 Total Flash memory (text + data + misc): 43402 bytes
martinsimpson 0:05e2c9ca68e2 44 Image: .\.build\K64F\ARM\mbed-os-example-blinky.bin
martinsimpson 0:05e2c9ca68e2 45 ```
martinsimpson 0:05e2c9ca68e2 46
martinsimpson 0:05e2c9ca68e2 47 ### Program your board
martinsimpson 0:05e2c9ca68e2 48
martinsimpson 0:05e2c9ca68e2 49 1. Connect your mbed device to the computer over USB.
martinsimpson 0:05e2c9ca68e2 50 1. Copy the binary file to the mbed device.
martinsimpson 0:05e2c9ca68e2 51 1. Press the reset button to start the program.
martinsimpson 0:05e2c9ca68e2 52
martinsimpson 0:05e2c9ca68e2 53 The LED on your platform turns on and off.
martinsimpson 0:05e2c9ca68e2 54
martinsimpson 0:05e2c9ca68e2 55 ## Export the project to Keil MDK, and debug your application
martinsimpson 0:05e2c9ca68e2 56
martinsimpson 0:05e2c9ca68e2 57 From the command-line, run the following command:
martinsimpson 0:05e2c9ca68e2 58
martinsimpson 0:05e2c9ca68e2 59 ```
martinsimpson 0:05e2c9ca68e2 60 mbed export -m K64F -i uvision
martinsimpson 0:05e2c9ca68e2 61 ```
martinsimpson 0:05e2c9ca68e2 62
martinsimpson 0:05e2c9ca68e2 63 To debug the application:
martinsimpson 0:05e2c9ca68e2 64
martinsimpson 0:05e2c9ca68e2 65 1. Start uVision.
martinsimpson 0:05e2c9ca68e2 66 1. Import the uVision project generated earlier.
martinsimpson 0:05e2c9ca68e2 67 1. Compile your application, and generate an `.axf` file.
martinsimpson 0:05e2c9ca68e2 68 1. Make sure uVision is configured to debug over CMSIS-DAP (From the Project menu > Options for Target '...' > Debug tab > Use CMSIS-DAP Debugger).
martinsimpson 0:05e2c9ca68e2 69 1. Set breakpoints, and start a debug session.
martinsimpson 0:05e2c9ca68e2 70
martinsimpson 0:05e2c9ca68e2 71 ![Image of uVision](img/uvision.png)
martinsimpson 0:05e2c9ca68e2 72
martinsimpson 0:05e2c9ca68e2 73 ## Troubleshooting
martinsimpson 0:05e2c9ca68e2 74
martinsimpson 0:05e2c9ca68e2 75 1. Make sure `mbed-cli` is working correctly and its version is `>1.0.0`
martinsimpson 0:05e2c9ca68e2 76
martinsimpson 0:05e2c9ca68e2 77 ```
martinsimpson 0:05e2c9ca68e2 78 mbed --version
martinsimpson 0:05e2c9ca68e2 79 ```
martinsimpson 0:05e2c9ca68e2 80
martinsimpson 0:05e2c9ca68e2 81 If not, you can update it:
martinsimpson 0:05e2c9ca68e2 82
martinsimpson 0:05e2c9ca68e2 83 ```
martinsimpson 0:05e2c9ca68e2 84 pip install mbed-cli --upgrade
martinsimpson 0:05e2c9ca68e2 85 ```
martinsimpson 0:05e2c9ca68e2 86
martinsimpson 0:05e2c9ca68e2 87 2. If using Keil MDK, make sure you have a license installed. [MDK-Lite](http://www.keil.com/arm/mdk.asp) has a 32 KB restriction on code size.