如何解决指纹模块命令数据包不向smt32f4发送响应
大家好 我目前正在研究指纹模块(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 举报,一经查实,本站将立刻删除。