update DataMem and finish UART