             while (count <= 100) {
                 if (trendBlock != 3) { // block 3 was read already and can be skipped
                     (*sensor).resultCodes[trendBlock] =  readSingleBlock(trendBlock, maxTrials, RXBuffer, (*sensor).fram, SS_PIN);
-                    #ifdef DEBUG
+                    #ifdef FRAM_DEBUG
                     Serial.printf("resultCode Block 0x%x: 0x%x", trendBlock, (*sensor).resultCodes[trendBlock]);
                     #endif
                 }

  myprintf("Simblee");
#endif

  if ( BatteryOK ) {
    readAllData();
    if (NFCReady == 2) {

  NFCReady = 0;
  SetNFCprotocolCommand(0);

//  print_statef("read patch info");
  runSystemInformationCommandUntilNoError(10);
  systemInformationData = systemInformationDataFromGetSystemInformationResponse();
  printSystemInformationData(systemInformationData);

#ifdef USE_SHADOWFRAM
  // get current sensor SN
  memcpy(sensor.uid, systemInformationData.uid, sizeof(sensor.uid));
  // check if sensor SN has changed
  bool identical = 1;
  for ( int i = 0 ; i < 8 ; i++ ) {
    if ( sensor.uid[i] != sensor.oldUid[i] ) {
      print_state("sensor UID missing or changed, ");
      identical = 0;
      break;
    }
  }
  // if we have a new or changed sensor UID initialize
  if ( !identical ) {
    myprintf("reinitialize sensor data structure");
    initSensor(&sensor);
  }
  // after reinitialization store the current UID for the next loop 
  memcpy(sensor.oldUid, systemInformationData.uid, sizeof(sensor.uid));
#endif /* USE_SHADOWFRAM */

  sensorData.sensorDataOK = readSensorData();

//  print_state("entering decodeSensorData()");

  if ( sensorData.sensorDataOK ) {
    decodeSensor();
