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
Nucleo64-L152RE.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 Nucleo64 L152RE 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 (This board) |
vic20 | 0:39a545e08ccd | 14 | Nucleo32-F303K8 3 64k 12k + 4k |
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 | (*) In DACs mean that one DAC has reduced range because |
vic20 | 0:39a545e08ccd | 26 | it is connected to the board LCD |
vic20 | 0:39a545e08ccd | 27 | |
vic20 | 0:39a545e08ccd | 28 | History: |
vic20 | 0:39a545e08ccd | 29 | |
vic20 | 0:39a545e08ccd | 30 | 2017/02/24 : First version |
vic20 | 0:39a545e08ccd | 31 | |
vic20 | 0:39a545e08ccd | 32 | **********************************************************************/ |
vic20 | 0:39a545e08ccd | 33 | |
vic20 | 0:39a545e08ccd | 34 | #define BSTRING "Nucleo64-L152RE SLab" |
vic20 | 0:39a545e08ccd | 35 | |
vic20 | 0:39a545e08ccd | 36 | #define F_SIZE 512 |
vic20 | 0:39a545e08ccd | 37 | #define R_SIZE 64 |
vic20 | 0:39a545e08ccd | 38 | |
vic20 | 0:39a545e08ccd | 39 | // ADCs |
vic20 | 0:39a545e08ccd | 40 | |
vic20 | 0:39a545e08ccd | 41 | #define AD1 A0 |
vic20 | 0:39a545e08ccd | 42 | #define AD2 A1 |
vic20 | 0:39a545e08ccd | 43 | #define AD3 A4 |
vic20 | 0:39a545e08ccd | 44 | #define AD4 A5 |
vic20 | 0:39a545e08ccd | 45 | |
vic20 | 0:39a545e08ccd | 46 | // DACs |
vic20 | 0:39a545e08ccd | 47 | #define DA1 A2 |
vic20 | 0:39a545e08ccd | 48 | #define DA2 D13 |
vic20 | 0:39a545e08ccd | 49 | //#define EXIST_DAC3 |
vic20 | 0:39a545e08ccd | 50 | |
vic20 | 0:39a545e08ccd | 51 | // Board capabilities implemented in firmware |
vic20 | 0:39a545e08ccd | 52 | #define NDACS 2 // Number of DACs |
vic20 | 0:39a545e08ccd | 53 | #define NADCS 4 // Number of ADCs |
vic20 | 0:39a545e08ccd | 54 | #define BSIZE 18000 // Unified buffer size (in samples) |
vic20 | 0:39a545e08ccd | 55 | #define MAX_STIME 100.0f // Maximum sample period is 100s |
vic20 | 0:39a545e08ccd | 56 | #define MAX_S_M 100 // Mantissa |
vic20 | 0:39a545e08ccd | 57 | #define MAX_S_E 0 // Exponent |
vic20 | 0:39a545e08ccd | 58 | #define MIN_STIME 0.000050f // Minimum sample period is 50us |
vic20 | 0:39a545e08ccd | 59 | #define MIN_S_M 50 // Mantissa |
vic20 | 0:39a545e08ccd | 60 | #define MIN_S_E -6 // Exponent |
vic20 | 0:39a545e08ccd | 61 | #define VDD_M 33 // Vdd Mantissa |
vic20 | 0:39a545e08ccd | 62 | #define VDD_E -1 // Exponent |
vic20 | 0:39a545e08ccd | 63 | #define VREF_M 33 // Vref Mantissa |
vic20 | 0:39a545e08ccd | 64 | #define VREF_E -1 // Exponent |
vic20 | 0:39a545e08ccd | 65 | #define DAC_BITS 12 // Number of DAC bits |
vic20 | 0:39a545e08ccd | 66 | #define ADC_BITS 12 // Number of ADC bits |
vic20 | 0:39a545e08ccd | 67 | #define MAX_SF 20000 // Maximum sample freq. for f response |
vic20 | 0:39a545e08ccd | 68 | #define MAX_SF_M 20 // Mantissa |
vic20 | 0:39a545e08ccd | 69 | #define MAX_SF_E 3 // Exponent |
vic20 | 0:39a545e08ccd | 70 | |
vic20 | 0:39a545e08ccd | 71 | // List of DAC and ADC pins |
vic20 | 0:39a545e08ccd | 72 | #define PIN_LIST "A2|D13|A0|A1|A4|A5|$" |