Arianna autonomous DAQ firmware

Dependencies:   mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW

Committer:
uci1
Date:
Fri Aug 31 02:09:09 2012 +0000
Revision:
15:f2569d8e4176
Parent:
8:95a325df1f6b
Child:
16:744ce85aede2
Removed debug output between trigger and and dFPGA->MB request that corrupted data. Lots of work on SBD, but not quite working yet. Debug output off, but start/stop running notifications are on.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
uci1 1:e392595b4b76 1 #ifndef SN_SnConstants
uci1 1:e392595b4b76 2 #define SN_SnConstants
uci1 1:e392595b4b76 3
uci1 1:e392595b4b76 4 #include "SnBitUtils.h"
uci1 1:e392595b4b76 5
uci1 1:e392595b4b76 6 //
uci1 1:e392595b4b76 7 // constants
uci1 1:e392595b4b76 8 //
uci1 1:e392595b4b76 9 static const uint32_t kBStime = 946684800u; // 1/1/2000 00:00:00 UTC
uci1 1:e392595b4b76 10 static const uint32_t kWDFailsafe = 1200u;
uci1 1:e392595b4b76 11 static const uint8_t kNchans = 4u;
uci1 1:e392595b4b76 12 static const uint8_t kNsamps = 128u;
uci1 1:e392595b4b76 13 static const uint8_t kNfpgaDacs = 4u;
uci1 3:24c5f0f50bf1 14 static const uint8_t kNplas = 5u;//72;
uci1 1:e392595b4b76 15 static const uint16_t kNoTrigPla = 0x0000u;
uci1 1:e392595b4b76 16 static const uint8_t kNcomms = 1u;
uci1 8:95a325df1f6b 17 static const uint16_t kNvoltsAve = 500u; // must be greater than ~10 (but not checked. <2 will result in divide by 0)
uci1 1:e392595b4b76 18
uci1 1:e392595b4b76 19 static const uint32_t kAbsMaxTimer = 1800u; // timers use integers counting us and can't go longer than ~ this many secs
uci1 1:e392595b4b76 20 // NOTE: these times below must be less than kAbsMaxTimer (this is not checked, however)
uci1 1:e392595b4b76 21 static const uint32_t kConnectTimeout = 30u; // seconds
uci1 1:e392595b4b76 22 static const uint32_t kListenTimeout = 30u; // seconds
uci1 15:f2569d8e4176 23 static const uint32_t kConnectTOSBD = 300u; // seconds
uci1 1:e392595b4b76 24 static const uint32_t kCommWinLongPrdTk = 300u; // seconds
uci1 3:24c5f0f50bf1 25 static const uint32_t kSecsPerYear = 3600u*24u*365u;
uci1 3:24c5f0f50bf1 26
uci1 1:e392595b4b76 27 static const uint16_t kTotSamps = kNchans*kNsamps;
uci1 1:e392595b4b76 28 static const uint16_t kTotDacs = kNchans*kNfpgaDacs;
uci1 1:e392595b4b76 29
uci1 1:e392595b4b76 30 enum ESnTrgTypes {
uci1 3:24c5f0f50bf1 31 kThmTrg=0, kFrcTrg=1, kExtTrg=2,
uci1 1:e392595b4b76 32 kNumTrgs
uci1 1:e392595b4b76 33 };
uci1 1:e392595b4b76 34
uci1 1:e392595b4b76 35 static const uint8_t kTrgBW[kNumTrgs] = { BIT(0), BIT(1), BIT(2) };
uci1 1:e392595b4b76 36
uci1 1:e392595b4b76 37
uci1 1:e392595b4b76 38
uci1 0:664899e0b988 39 #endif // SN_SnConstants