Firmware for Nucleo boards for the SLab system Description at http://r6500.blogspot.com.es/2018/02/slab-first-release.html All associated files at https://github.com/R6500/SLab
Nucleo32-F303K8.h@0:39a545e08ccd, 2018-02-10 (annotated)
- Committer:
- vic20
- Date:
- Sat Feb 10 09:43:16 2018 +0000
- Revision:
- 0:39a545e08ccd
- Child:
- 1:d81bef65eece
First commit (Version 1.10)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vic20 | 0:39a545e08ccd | 1 | /************************************************************************** |
vic20 | 0:39a545e08ccd | 2 | |
vic20 | 0:39a545e08ccd | 3 | Header file for the Nucleo32 F303K8 Board |
vic20 | 0:39a545e08ccd | 4 | |
vic20 | 0:39a545e08ccd | 5 | Basic requirements for a board are: |
vic20 | 0:39a545e08ccd | 6 | MBED Compatible |
vic20 | 0:39a545e08ccd | 7 | 2 DACs or more |
vic20 | 0:39a545e08ccd | 8 | 4 ADCs or more |
vic20 | 0:39a545e08ccd | 9 | That includes the following Nucleo Boards |
vic20 | 0:39a545e08ccd | 10 | |
vic20 | 0:39a545e08ccd | 11 | Board DACs Flash RAM |
vic20 | 0:39a545e08ccd | 12 | Nucleo64-F303RE 2* 512k 64k + 16k |
vic20 | 0:39a545e08ccd | 13 | Nucleo64-L152RE 2* 512k 80k |
vic20 | 0:39a545e08ccd | 14 | Nucleo32-F303K8 3 64k 12k + 4k (This board) |
vic20 | 0:39a545e08ccd | 15 | Nucleo64-F072RB 2 128k 16k |
vic20 | 0:39a545e08ccd | 16 | Nucleo64-F091RC 2 256k 32k |
vic20 | 0:39a545e08ccd | 17 | Nucleo64-F334R8 3 64k 12k + 4k |
vic20 | 0:39a545e08ccd | 18 | Nucleo64-F446RE 2 512k 128k |
vic20 | 0:39a545e08ccd | 19 | Nucleo64-L073RZ 2 192k 20k |
vic20 | 0:39a545e08ccd | 20 | Nucleo64-L476RG 2 1M 128k |
vic20 | 0:39a545e08ccd | 21 | |
vic20 | 0:39a545e08ccd | 22 | (*) In DACs mean that one DAC has reduced range because |
vic20 | 0:39a545e08ccd | 23 | it is connected to the board LCD |
vic20 | 0:39a545e08ccd | 24 | |
vic20 | 0:39a545e08ccd | 25 | History: |
vic20 | 0:39a545e08ccd | 26 | |
vic20 | 0:39a545e08ccd | 27 | 2017/02/24 : First version |
vic20 | 0:39a545e08ccd | 28 | It seems that there are problems with the serial at MBED |
vic20 | 0:39a545e08ccd | 29 | Waiting for the problem to be corrected |
vic20 | 0:39a545e08ccd | 30 | |
vic20 | 0:39a545e08ccd | 31 | *************************************************************************/ |
vic20 | 0:39a545e08ccd | 32 | |
vic20 | 0:39a545e08ccd | 33 | #define BSTRING "Nucleo32-F303K8 Slab" |
vic20 | 0:39a545e08ccd | 34 | |
vic20 | 0:39a545e08ccd | 35 | #define F_SIZE 64 |
vic20 | 0:39a545e08ccd | 36 | #define R_SIZE 16 |
vic20 | 0:39a545e08ccd | 37 | |
vic20 | 0:39a545e08ccd | 38 | // ADCs |
vic20 | 0:39a545e08ccd | 39 | |
vic20 | 0:39a545e08ccd | 40 | #define AD1 A0 |
vic20 | 0:39a545e08ccd | 41 | #define AD2 A1 |
vic20 | 0:39a545e08ccd | 42 | #define AD3 A6 |
vic20 | 0:39a545e08ccd | 43 | #define AD4 A7 |
vic20 | 0:39a545e08ccd | 44 | |
vic20 | 0:39a545e08ccd | 45 | // DACs |
vic20 | 0:39a545e08ccd | 46 | |
vic20 | 0:39a545e08ccd | 47 | #define DA1 A3 |
vic20 | 0:39a545e08ccd | 48 | #define DA2 A4 |
vic20 | 0:39a545e08ccd | 49 | #define EXIST_DAC3 |
vic20 | 0:39a545e08ccd | 50 | #define DA3 A5 |
vic20 | 0:39a545e08ccd | 51 | |
vic20 | 0:39a545e08ccd | 52 | // Board capabilities implemented in firmware |
vic20 | 0:39a545e08ccd | 53 | #define NDACS 3 // Number of DACs |
vic20 | 0:39a545e08ccd | 54 | #define NADCS 4 // Number of ADCs |
vic20 | 0:39a545e08ccd | 55 | #define BSIZE 3000 // Unified buffer size (in samples) |
vic20 | 0:39a545e08ccd | 56 | #define MAX_STIME 100.0f // Maximum sample period is 100s |
vic20 | 0:39a545e08ccd | 57 | #define MAX_S_M 100 // Mantissa |
vic20 | 0:39a545e08ccd | 58 | #define MAX_S_E 0 // Exponent |
vic20 | 0:39a545e08ccd | 59 | #define MIN_STIME 0.000025f // Minimum sample period is 20us |
vic20 | 0:39a545e08ccd | 60 | #define MIN_S_M 20 // Mantissa |
vic20 | 0:39a545e08ccd | 61 | #define MIN_S_E -6 // Exponent |
vic20 | 0:39a545e08ccd | 62 | #define VDD_M 33 // Vdd Mantissa |
vic20 | 0:39a545e08ccd | 63 | #define VDD_E -1 // Exponent |
vic20 | 0:39a545e08ccd | 64 | #define VREF_M 33 // Vref Mantissa |
vic20 | 0:39a545e08ccd | 65 | #define VREF_E -1 // Exponent |
vic20 | 0:39a545e08ccd | 66 | #define DAC_BITS 12 // Number of DAC bits |
vic20 | 0:39a545e08ccd | 67 | #define ADC_BITS 12 // Number of ADC bits |
vic20 | 0:39a545e08ccd | 68 | #define MAX_SF 38000 // Maximum sample freq. for f response |
vic20 | 0:39a545e08ccd | 69 | #define MAX_SF_M 38 // Mantissa |
vic20 | 0:39a545e08ccd | 70 | #define MAX_SF_E 3 // Exponent |
vic20 | 0:39a545e08ccd | 71 | |
vic20 | 0:39a545e08ccd | 72 | // List of DAC and ADC pins |
vic20 | 0:39a545e08ccd | 73 | #define PIN_LIST "A3|A4|A5|A0|A1|A6|A7|$" |