| | |
| | | { |
| | | SIZHU_HISTORY_INTERVAL_T sizhu_history_interval_l; |
| | | |
| | | return; //?û¾¹ý²âÊÔ£¬ÏÈÆÁ±Î |
| | | // return; //?û¾¹ý²âÊÔ£¬ÏÈÆÁ±Î |
| | | |
| | | arrayA_2_arrayB((uint8_t *)&sys_clockBCD_g,(uint8_t *)&sizhu_history_interval_l.record_time_BCD,sizeof(sys_clockBCD_g), LITTLE_ENDIAN); |
| | | |
| | |
| | | { |
| | | static uint8_t test_start_flag =0; |
| | | ErrorStatus test_Status = PASS; |
| | | uint16_t count_i = 0; |
| | | uint16_t record_num = 0; |
| | | uint16_t have_record_num = 0; |
| | | uint32_t read_addr; |
| | | uint32_t err_addr; |
| | | uint32_t err_count; |
| | | |
| | | SIZHU_HISTORY_INTERVAL_T history_interval_l; |
| | | |
| | | |
| | | |
| | | if(test_start_flag == 1){ |
| | | test_start_flag = 0; |
| | | //¼ä¸ô¼Ç¼²âÊÔ |
| | | have_record_num = 0; |
| | | record_num = log_sizhu_history_ctrl_g.per_interval_log.log_count; |
| | | read_addr = log_sizhu_history_ctrl_g.per_interval_log.log_addr_save; |
| | | for(count_i = 0;count_i < record_num;count_i++){ |
| | | have_record_num ++; |
| | | |
| | | if(read_addr <= HISTORY_INTERVAL_START_ADDR) |
| | | read_addr = HISTORY_INTERVAL_END_ADDR; |
| | | else |
| | | read_addr -= HISTORY_INTERVAL_LENGTH; |
| | | |
| | | if(FlashMultipleReadAndCrcCheck((uint8_t *)&history_interval_l,read_addr,HISTORY_INTERVAL_LENGTH)== PASS){ |
| | | |
| | | }else{ |
| | | test_Status = FAIL; |
| | | break; |
| | | } |
| | | |
| | | } |
| | | |
| | | if(test_Status == FAIL){ |
| | | err_addr = read_addr; |
| | | err_count = log_sizhu_history_ctrl_g.per_interval_log.log_count - count_i; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | HistoryRecordTest(); |
| | | HistoryRecordTest(); //?²âÊÔº¯Êý£¬²âÊÔÍêÐèҪעÊÍ |
| | | |
| | | } |
| | | |