Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
SnPreCompOptions.h@124:4637a6546cad, 2018-10-17 (annotated)
- Committer:
- uci1
- Date:
- Wed Oct 17 20:14:53 2018 +0000
- Revision:
- 124:4637a6546cad
- Parent:
- 122:c1b5023eac69
- Child:
- 125:ce4045184366
As deployed 2018-2019
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
uci1 | 84:80b15993944e | 1 | #ifndef SN_SnPreCompOptions |
uci1 | 84:80b15993944e | 2 | #define SN_SnPreCompOptions |
uci1 | 84:80b15993944e | 3 | |
uci1 | 119:b3d7699d0eb0 | 4 | /****************************************************************************** |
uci1 | 119:b3d7699d0eb0 | 5 | ** NOTE NOTE NOTE NOTE NOTE |
uci1 | 119:b3d7699d0eb0 | 6 | ** |
uci1 | 119:b3d7699d0eb0 | 7 | ** These settings are essential! Double check ALL settings! |
uci1 | 119:b3d7699d0eb0 | 8 | ** |
uci1 | 119:b3d7699d0eb0 | 9 | ** To change for new hardware, set BOTH appropriately: |
uci1 | 119:b3d7699d0eb0 | 10 | ** CHIPBOARD |
uci1 | 119:b3d7699d0eb0 | 11 | ** DAC_BITS |
uci1 | 119:b3d7699d0eb0 | 12 | ******************************************************************************/ |
uci1 | 119:b3d7699d0eb0 | 13 | |
uci1 | 119:b3d7699d0eb0 | 14 | |
uci1 | 84:80b15993944e | 15 | // whether to send debugging output to the serial (usb) port |
uci1 | 116:8099b754fbb4 | 16 | // note that this file may not be included in cpp files, so it |
uci1 | 116:8099b754fbb4 | 17 | // may be necessary to add more DEBUG defines in those files. |
uci1 | 84:80b15993944e | 18 | // also, the comms and peripherals packages will have their own |
uci1 | 84:80b15993944e | 19 | // separate debug switches too. |
uci1 | 84:80b15993944e | 20 | //#define DEBUG |
uci1 | 84:80b15993944e | 21 | |
uci1 | 84:80b15993944e | 22 | // sorry for the double negative, but.. normally this is NOT DEFINED |
uci1 | 84:80b15993944e | 23 | // uncommenting this will allow any values to be specified in a configuration |
uci1 | 84:80b15993944e | 24 | // leaving it commented out is safer |
uci1 | 118:d07ceb4b4813 | 25 | //#define DISABLE_CONFIG_SAFETYNETS |
uci1 | 84:80b15993944e | 26 | |
uci1 | 84:80b15993944e | 27 | // choose which communication peripherals will be used in the comms loop |
uci1 | 84:80b15993944e | 28 | // for now, twitter is completely not working. |
uci1 | 116:8099b754fbb4 | 29 | // NOTE: remember to set kNcomms in SnConstants.h so it equals the number |
uci1 | 116:8099b754fbb4 | 30 | // of comms enabled!! |
uci1 | 84:80b15993944e | 31 | #define ENABLE_AFAR_COMM |
uci1 | 84:80b15993944e | 32 | #define ENABLE_SBD_COMM |
uci1 | 84:80b15993944e | 33 | //#define ENABLE_USB_COMM |
uci1 | 116:8099b754fbb4 | 34 | //#define ENABLE_AFAR_TWITTER // this is stupid and doesn't work anymore. do not enable. |
uci1 | 84:80b15993944e | 35 | |
uci1 | 84:80b15993944e | 36 | // turn this on to record how long it takes to take and save events |
uci1 | 84:80b15993944e | 37 | //#define EVT_TIME_PROFILE |
uci1 | 84:80b15993944e | 38 | |
uci1 | 84:80b15993944e | 39 | // print the start and stop running messages on the seial (USB) port |
uci1 | 84:80b15993944e | 40 | // even if other debugging messages are disabled. |
uci1 | 84:80b15993944e | 41 | //#define SSNOTIFY |
uci1 | 84:80b15993944e | 42 | |
uci1 | 84:80b15993944e | 43 | // use MODSERIAL (a buffered serial interface) instead of the |
uci1 | 84:80b15993944e | 44 | // "standard" serial (unbuffered) provided by mbed |
uci1 | 84:80b15993944e | 45 | #define USE_MODSERIAL |
uci1 | 84:80b15993944e | 46 | |
uci1 | 84:80b15993944e | 47 | |
uci1 | 84:80b15993944e | 48 | // available CHIPBOARDs -- these values should NEVER change! |
uci1 | 84:80b15993944e | 49 | // this is just a definition of constants. CHIPBOARD is the |
uci1 | 84:80b15993944e | 50 | // variable that must be set equal to one of these constants. |
uci1 | 116:8099b754fbb4 | 51 | #define ATWD4CH 0 // set CHIPBOARD to this to get firmware for the 2012-2013 stations (value is arbitrary but unique) |
uci1 | 116:8099b754fbb4 | 52 | #define SST4CH 1 // set CHIPBOARD to this to get firmware for the 2014/2015 stations with a single SST chip (value is arbitrary but unique) |
uci1 | 116:8099b754fbb4 | 53 | #define SST4CH_1GHz 2 // set CHIPBOARD to this to get firmware for the 2015 station with a single SST chip running at 1GHz sampling rather than 2GHz (value is arbitrary but unique) |
uci1 | 116:8099b754fbb4 | 54 | #define SST4CH512 3 // set CHIPBOARD to this to get firmware for the 2014/2015 stations with a single SST chip (value is arbitrary but unique) |
uci1 | 116:8099b754fbb4 | 55 | #define SST4CH512_1GHz 4 // set CHIPBOARD to this to get firmware for the 2015 station with a single SST chip running at 1GHz sampling rather than 2GHz (value is arbitrary but unique) |
uci1 | 119:b3d7699d0eb0 | 56 | #define SST8CH 5 // set CHIPBOARD to this to get firmware for the 2014/2015 stations with 2 SST chips (value is arbitrary but unique) |
uci1 | 119:b3d7699d0eb0 | 57 | #define SST8CH_1GHz 6 // set CHIPBOARD to this to get firmware for the 2015 station with 2 SST chips running at 1GHz sampling rather than 2GHz (value is arbitrary but unique) |
uci1 | 84:80b15993944e | 58 | |
uci1 | 84:80b15993944e | 59 | // which chip/board combination to build this firmware for |
uci1 | 84:80b15993944e | 60 | //#define CHIPBOARD ATWD4CH |
uci1 | 120:1a43bc4a06b3 | 61 | //#define CHIPBOARD SST4CH |
uci1 | 118:d07ceb4b4813 | 62 | //#define CHIPBOARD SST4CH_1GHz |
uci1 | 119:b3d7699d0eb0 | 63 | //#define CHIPBOARD SST4CH512 // warning: 4*512 samples may fill up the 32kB of RAM. it may be necessary to comment out ENABLE_AFAR_COMM in order to free up RAM |
uci1 | 119:b3d7699d0eb0 | 64 | //#define CHIPBOARD SST4CH512_1GHz // warning: 4*512 samples may fill up the 32kB of RAM. it may be necessary to comment out ENABLE_AFAR_COMM in order to free up RAM |
uci1 | 119:b3d7699d0eb0 | 65 | //#define CHIPBOARD SST8CH // warning: 8*256 samples may fill up the 32kB of RAM. it may be necessary to comment out ENABLE_AFAR_COMM in order to free up RAM |
uci1 | 120:1a43bc4a06b3 | 66 | #define CHIPBOARD SST8CH_1GHz // warning: 8*256 samples may fill up the 32kB of RAM. it may be necessary to comment out ENABLE_AFAR_COMM in order to free up RAM |
uci1 | 119:b3d7699d0eb0 | 67 | |
uci1 | 119:b3d7699d0eb0 | 68 | // how many bits the DACs use |
uci1 | 120:1a43bc4a06b3 | 69 | //#define DAC_BITS 12 // use for 4ch atwd/sst boards |
uci1 | 120:1a43bc4a06b3 | 70 | #define DAC_BITS 16 // use for 8ch sst boards (2017-18) |
uci1 | 84:80b15993944e | 71 | |
uci1 | 84:80b15993944e | 72 | // whether or not to use the flash memory on the mbed board, to call |
uci1 | 84:80b15993944e | 73 | // the mbed provided function that gets the MAC address, etc. |
uci1 | 84:80b15993944e | 74 | // these functions all use the mbed interface chip. it has been found |
uci1 | 84:80b15993944e | 75 | // that once in while, functions accessing the interface chip will block |
uci1 | 84:80b15993944e | 76 | // forever and never return, resulting in a "brain dead" station. |
uci1 | 84:80b15993944e | 77 | // therefore, this should almost certainly be disabled (commented out) |
uci1 | 84:80b15993944e | 78 | // for stations installed in the ice. |
uci1 | 118:d07ceb4b4813 | 79 | //#define USE_INTERFACE_CHIP |
uci1 | 84:80b15993944e | 80 | |
uci1 | 122:c1b5023eac69 | 81 | // if defined, try to read the default config from the SD card |
uci1 | 122:c1b5023eac69 | 82 | // instead of the interface chip |
uci1 | 122:c1b5023eac69 | 83 | #define LOAD_DEFAULT_CONFIG_FROM_SD |
uci1 | 122:c1b5023eac69 | 84 | |
uci1 | 122:c1b5023eac69 | 85 | // if defined, will start with both AFAR and SBD powered up during the |
uci1 | 122:c1b5023eac69 | 86 | // first comm win after boot up. otherwise, only SBD will be powered |
uci1 | 122:c1b5023eac69 | 87 | //#define AFAR_ON_FIRST_COMM_HARDCONF |
uci1 | 122:c1b5023eac69 | 88 | |
uci1 | 122:c1b5023eac69 | 89 | // whether or not to try to load the default config (wherever it's |
uci1 | 122:c1b5023eac69 | 90 | // located -- SD card or interface_chip) immediately -- that is, before |
uci1 | 122:c1b5023eac69 | 91 | // even the first communication. Be careful! It's possible this can fail |
uci1 | 122:c1b5023eac69 | 92 | // and prevent any communications, possibly resulting in a "brain dead" |
uci1 | 122:c1b5023eac69 | 93 | // station? Safer to leave this commented out. |
uci1 | 122:c1b5023eac69 | 94 | //#define LOAD_DEFAULT_CONFIG_IMMEDIATELY |
uci1 | 84:80b15993944e | 95 | |
uci1 | 84:80b15993944e | 96 | // whether or not to use the lookup tables to speed up the FFTs |
uci1 | 84:80b15993944e | 97 | #define USE_DFFT_LUTS |
uci1 | 84:80b15993944e | 98 | |
uci1 | 116:8099b754fbb4 | 99 | // use of the real time operating system has not been implemented |
uci1 | 116:8099b754fbb4 | 100 | // for some time -- enabling this will not work any more. |
uci1 | 116:8099b754fbb4 | 101 | // some development will be needed, including a RTOS aware networking package |
uci1 | 116:8099b754fbb4 | 102 | //#define USE_RTOS // change USE_RTOS in CommConstants and EthernetPower also |
uci1 | 116:8099b754fbb4 | 103 | |
uci1 | 116:8099b754fbb4 | 104 | // an outdated switch. currently only NetServicesMin is available. |
uci1 | 116:8099b754fbb4 | 105 | //#define USE_ETH_INTERFACE |
uci1 | 116:8099b754fbb4 | 106 | |
uci1 | 116:8099b754fbb4 | 107 | |
uci1 | 84:80b15993944e | 108 | #endif // SN_SnPreCompOptions |