Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
Diff: main.cpp
- Revision:
- 61:42cbfc02e0e0
- Parent:
- 59:21128cc24b04
- Child:
- 62:4b59c1eb429f
--- a/main.cpp Tue Nov 04 03:54:23 2014 +0000 +++ b/main.cpp Sat Nov 22 02:35:11 2014 +0000 @@ -260,7 +260,8 @@ static uint32_t gEvtNumDt = 0; // number of event time diffs added up // this should be bigger than anything that will actually be used static const uint32_t gBufSize=SnStatusFrame::kMaxSizeOf + (2u*SnHeaderFrame::kMaxSizeOf) + SnPowerFrame::kMaxSizeOf - + SnEventFrame::kMaxSizeOf; // (this is redundant and could be removed if mem is sparse) + + SnEventFrame::kMaxSizeOf // (this is redundant and could be removed if mem is sparse) + + 512; // breathing room //static const uint32_t gB64Bsize=BASE64ENC_LEN(gBufSize)+1; //static char gB64Buf[gB64Bsize]; static char gGenBuf[gBufSize]; // must be big enough for event or status or config! @@ -681,7 +682,7 @@ printf("attach temp chk %g\r\n",ctp); #endif } - +/* void UponBrownout() { // signal brownout by all LEDs off led1 = led2 = led3 = led4 = 0; @@ -707,7 +708,7 @@ // goodnight Sleep(); } - +*/ void StopRunning() { #if defined(DEBUG) || defined(SSNOTIFY) printf("stop running\r\n"); @@ -784,11 +785,13 @@ // the function that initializes it, so it can call the fcn later SnSDUtils::fgDoInit = &InitSDCard; + /* // Note: the brownout isn't useful since it sees either 5V or nothing on our board // set up the brownout interrupt NVIC_SetVector(BOD_IRQn, (uint32_t)&UponBrownout); // Enable Brown Out Detect Interrupt NVIC_EnableIRQ(BOD_IRQn); + */ #ifdef DEBUG printf("making comm objects\r\n"); @@ -1258,6 +1261,7 @@ printf("bef: pconp=%u (%08x), pcenet=%u (%08x)\r\n", LPC_SC->PCONP, LPC_SC->PCONP, LPC1768_PCONP_PCENET, LPC1768_PCONP_PCENET); printf("pcenet bef power: status=%d\r\n",Peripheral_GetStatus(LPC1768_PCONP_PCENET)); + printf("WD reset = %d\r\n",(int)Watchdog::didWatchdogReset()); #endif SnConfigFrame::EPowerModeBit cardpb(SnConfigFrame::kCardDatTak),