Tool/software:
This seems to be a frequent issue and in reading the search results a clear resolution is not shown.
In the code below the getVersionInfo(); routine being called in main() is hanging where I commented in release mode. Debug runs fine.
Any ideas? Timer interrupt issue?
static void getVersionInfo() { // Wait around for the bluebox to be awake, and try to get the verison info. // But timeout eventually to allow for the case of an older bluebox that doesn't support reporting version u8 attempts = 0; while(attempts++ < 10) { if(strncmp(G.blueboxVersionInfo->ProcVariant, DEFAULT_VARIANT, VARIANT_INFO_SZ) != 0) break; bluebox_packetToRequestVersionInfo(&G.blueboxTxFifo); bluebox_sendPacket(&G.blueboxTxFifo); // Wait 0.1s; using LED timer for convenience // hangs here in RELEASE mode AD while(!G.ledTmr.timedOut) {} RestartGenTimer(&G.ledTmr); bluebox_periodic(); } } void getClkID() { // read 4 position dip switch if (DIP_SW & 8) // screen alignment, hangs here as long as SW6-4 is on { drawAlign(); while(1); } else clk_id= (DIP_SW & 3); } int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop wdt initHardware(); RUNledOff; initGlobals(); bluebox_init(); _enable_interrupts(); // hangs in RELEASE mode AD // getVersionInfo(); getClkID(); menus_init(); // I think it requires interrupts to be enabled, but I'm not sure. For now, don't put it before _enable_interrupts(). drawClkID(); RUNledOn; for(;;) { buttons(); menu(); bluebox_periodic(); // parse and display received data packet AD // LPM0; } }