This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR2355: Why does 0x0d work and '\0' not???

Part Number: MSP430FR2355


Hello....

I have the following code in a UART RX ISR.  If I replace '\0' with 0x0d the code works and I capture NMEA GPS messages aligned with the buffer and I wake up and all works as I wish HOWEVER if I replace 0x0d with '\0' the code never wakes up (defined as ISR.GPS_NMEACharRcvdFlag = T)

gpsChar is a volatile uint8_t

Can someone explain what I am overlooking here?

          gpsChar = gps.pSysCommsA->UCAxRXBUF;

          if (gpsChar == '$')
              captureMssg = T;
          else if (gpsChar == '\0')
              captureMssg = F;

          if (captureMssg)
              NMEAData[NMEASentenceSize++] = gpsChar;
          else
          {
              if (NMEASentenceSize != 0)
              {
                  NMEASentenceSize = 0;
                  ISR.GPS_NMEACharRcvdFlag = T;
              }
          }
          LPM3_EXIT;

**Attention** This is a public forum