I assume that you are using a MSP430 F 5659 with USCI and not e USCI. Right? [Itsik] correct Did you noticed any received data missing in your circular buffer? (Especially when you detected data overrun error.) [Itsik] - I'm receiving the byte anyway for clearing the overrun flag. I did not look at the data but all I know that after that something wrong is happened after that that finally cause to the system to restart. Did you set or clear the UCRXEIE bit in the UCAxCTL1 register? [itsik] - Yes. Could you show us the code fragments where you read the UCAxSTAT and the UCAxRXBUF registers?Specifically, how many times did you reference these two resisters? And in what order? [Itsik] - not relevant code excluded. It called from interrupt handler. This is the only place it called. The problem happens once 15 min after restart. #define UARTReceiveBufferReg() (HWREG8((BT_UART_MODULE_BASE) + OFS_UCAxRXBUF)) VectorRegister = BT_UART_IVR; /* Determine the cause of the interrupt (Rx or Tx). */ if(VectorRegister == USCI_UCRXIFG) { uint8 u8UartStatTmp = USCI_A_UART_queryStatusFlags(UartContext.UartBase,0xEC); if(u8UartStatTmp) { Dummy = UARTReceiveBufferReg(); } else { UartContext.RxBuffer[InIndex++] = UARTReceiveBufferReg(); } }
↧