问题描述
大家好 我目前正在研究指纹模块(fpm10)。我读了很多数据表,但是每个数据表都有不同的命令包,之后我引用了R305数据表,之后我编写了一个命令包代码以发送STM32,但fpm10不会发送响应给stm32。 verifypassword命令包模块发送了我的命令包,但是没有响应。我调试了鳕鱼,但我没有得到任何错误
uint16_t FP_Verify_Password[16]={0xEF,0x01,0xFF,0x00,0x07,0x13,0x05};
void Finger_Get_img(void)
{
delay_ms(500);
if(my_finger==true)
{
//only one time will be apply
for(i=6 ; i<=13 ; i++)
checksum+=FP_Verify_Password[i];
FP_Verify_Password[14]=checksum&0xFF00;
FP_Verify_Password[15]=checksum&0x00FF;
}
for(i=0;i<16;i++)
{
// USART_SendData(USART2,FP_Pack_Head[i]);
delay_ms(50);
USART_Finger(USART1,FP_Verify_Password[i]);
delay_ms(50);
USART_Finger(USART6,FP_Verify_Password[i]);
delay_ms(50);
}
delay_ms(2000);
// GPIO_ResetBits(GPIOG,GPIO_Pin_13);
my_finger=false;
}
蓝牙和指纹打印模块配置
//fingerprint module configurations
RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1,ENABLE);
USART_InitStruct.USART_Baudrate=57600;
USART_InitStruct.USART_HardwareFlowControl=USART_HardwareFlowControl_None;
USART_InitStruct.USART_Mode=USART_Mode_Rx|USART_Mode_Tx;
USART_InitStruct.USART_Parity=USART_Parity_No;
USART_InitStruct.USART_StopBits=USART_StopBits_1;
USART_InitStruct.USART_WordLength=USART_WordLength_8b;
USART_Init(USART1,&USART_InitStruct);
USART_Cmd(USART1,ENABLE);
USART_ITConfig(USART1,USART_IT_RXNE,ENABLE);
//bluetooth module configurations
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOC,ENABLE);
GPIO_PinAFConfig(GPIOC,GPIO_PinSource6,GPIO_AF_USART6);
GPIO_PinAFConfig(GPIOC,GPIO_PinSource7,GPIO_AF_USART6);
GPIO_InitStruct.GPIO_Mode=GPIO_Mode_AF;
GPIO_InitStruct.GPIO_OType=GPIO_OType_PP;
GPIO_InitStruct.GPIO_Pin=GPIO_Pin_6|GPIO_Pin_7;
GPIO_InitStruct.GPIO_PuPd=GPIO_PuPd_UP;
GPIO_InitStruct.GPIO_Speed=GPIO_Speed_100MHz;
GPIO_Init(GPIOC,&GPIO_InitStruct);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART6,ENABLE);
USART_InitStruct.USART_Baudrate=9600;
USART_InitStruct.USART_HardwareFlowControl=USART_HardwareFlowControl_None;
USART_InitStruct.USART_Mode=USART_Mode_Rx|USART_Mode_Tx;
USART_InitStruct.USART_Parity=USART_Parity_No;
USART_InitStruct.USART_StopBits=USART_StopBits_1;
USART_InitStruct.USART_WordLength=USART_WordLength_8b;
USART_Init(USART6,&USART_InitStruct);
USART_Cmd(USART6,ENABLE);
这是我的命令包
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)