麻烦帮忙看下如下问题:μ A
问题背景:μ A
根据官方给的MSP430的例程移植到STM32F207上,在读取多个块数据时会出现下列问题:μ A
1.移动天线的位置会导致读取不到;μ A
2.长时间运行运行标签会漏读;μ A
下面是相关代码:μ A
uint8_t Iso15693ReadMbTransceive (结构 RFBuffer *PI) 
{ 
uint8_t j = 1、command[2]、no_slots; 
uint8_t *p_slot_no、slot_no[17]; 
SLOT_NO[0]= 0x00; 
//错误修复 
TRF796xCheckRXWaitTime(); 
// if ((flags & BIT5)== 0x00)//flags = 0x06 
如果((buf[6]== 0x01)&&((flags & BIT5)== 0x00)) 
{ 
NO_SLOTS = 16; 
Trf796xEnableSlotCounter ();/使能无响应中断B0位 
} 
方案 
{ 
NO_SLOTS = 1; 
} 
P_SLOT_NO =&SLOT_NO[0];//0x00 
buf[0]= 0x8F; 
buf[1]= 0x91; 
buf[2]= 0x3d; 
buf[3]=(char)(pi->RFLength >>8); 
buf[4]=(char)(pi->RFLength << 4); 
memcpy (&buf[5]、pi->RFData、pi->RFLength); 
Trf796xResetIrqStatus(); 
//设置20ms的定时器 
//清除外部中断标志位 
__ HAL_GPIO_EXTI_CLEAR_IT (GPIO_PIN_11); 
Trf796xRawWrite (&buf[0],5 + PI->RFLength);//μ 完成数据交换 
I_reg = 0x01; 
IRQ_FLAG = 0x00; 
//在这里开启计数器 
// delay_ms (10); 
HAL_TIM_Base_Start_IT (&htim2); 
while (IRQ_flag == 0x00) 
{ 
} 
对于(j = 1;j <= no_slots;j++) 
{ 
//这里需要20ms计数器 
delay_ms (20); 
COMMAND[0]= rssi_levels; 
Trf796xReadSingle (命令); 
开关(I_reg) 
{ 
case 0xFF: 
foundTag = 1; 
Testdata = rxtx_state - 1; 
memcpy (π->RFData[0]、&buf[1]、testdata); 
中断; 
案例0x02: 
P_SLOT_NO++; 
*p_slot_no = j; 
中断; 
案例0x00: 
中断; 
默认值: 
中断; 
} 
Trf796xReset (); 
如果((no_slots == 16)&&(j <16)) 
{ 
Trf796xStopDecoders(); 
Trf796xRunDecoders(); 
Trf796xTransmitNextSlot(); 
} 
如果((no_slots =16)&&(j =16))、则为其他项 
{ 
Trf796xStopDecoders(); 
Trf796xDisableSlotCounter (); 
} 
否则、如果(NO_SLOTS =1) 
{ 
中断; 
} 
}//end for 
if (foundTag == 1) 
{ 
__ HAL_GPIO_EXTI_CLEAR_IT (GPIO_PIN_11);//上的中断标志 Line1清除 
foundTag = 0; 
RxTx_state = 1; 
返回0x01; 
} 
//关闭外部中断 
__ HAL_GPIO_EXTI_CLEAR_IT (GPIO_PIN_11);//上的中断标志 Line1清除 
foundTag = 0; 
RxTx_state = 1; 
返回0x00; 
}