CR95HF stuck
Hello,
I have my own board with stm32f0 and cr95hf
I use SPI to communicate with NFC module,
buy sometimes, like once out of a hundred, CR95HF stuck and the only way to solve the problem is to reset power.
I've tried SPI Reinit, sending reset cmd and etc. but still the same.
void CR95_Init(void) {
//SSI1 - RESET STATE and SSI0 - SET by default
uint8_t echo = 0;
IRQ_IN_HIGH();
osDelay(1);
IRQ_IN_LOW();
osDelay(1);
IRQ_IN_HIGH();
osDelay(15);
CHIP_SELECT();
HAL_SPI_Transmit(&hspi1, (uint8_t *)&CtrlBt_Reset, 1, 100);
CHIP_UNSELECT();
osDelay(100);
echo = NFC_Echo();
while (echo != 1) {
echo = NFC_Echo();
if (echo != 1) {
//Also trying to send to Hibernate state and reinit, but useless
Hibernate();
}
HAL_GPIO_TogglePin(LED_R_GPIO_Port, LED_R_Pin);
osDelay(100);
}
NFC_ProtocolSelect(Protocol_ISO_14443A,0x00);
Get_Sound(1, 150);
osDelay(1000);
}Maybe I am doing something wrong or there is a solution to make it work without power reset
Thank you,
Anton
