1.stm32上数据存储小端模式
uint32_t x;
getvalue(&x);
getvalue(char *sec_buf)
{
uint32_t t_sec = .....;
sec_buf[0] = (t_sec & 0x0ff);
sec_buf[1] = ((t_sec>>8) & 0x0ff);
sec_buf[2] = ((t_sec>>16) & 0x0ff);
sec_buf[3] = ((t_sec>>24) & 0x0ff);
}