Hi Gaby,
here is an example of startup sequence (delay unit is ms):
Init:
retry = 5
Send_nIRQ_IN_Pulse
Send_Reset
while (Send_Echo == Error) && (retry --!= 0)
Send_Reset
if retry ==0
abort
End_init
Send_nIRQ_IN_Pulse
Set_N_IRQ_IN
Delay(1) /* t0 */
Clear_N_IRQ_IN
Delay(1) /* t1 */
Set_N_IRQ_IN
Delay(11) /* t3 */
End_Send_nIRQ_IN_Pulse:
Send_Reset
SPIDeselect;
Delay(1)
SPISelect()
SPISendReceiveByte(CONTROL_RESET) /* Send Reset Control byte over SPI */
Delay(1)
SPIDeselect()
Delay(3)
Send_nIRQ_IN_Pulse
End_Send_Reset
Before issuing the first command, a reset control (0x01) is sent after the t3 expiry. This is used in case the MCU has restarted (e.g watchdog or sw reset) to avoid to have the CR95HF in an unknown state.
Then an echo command is sent. In case of error, the CR95HF is reset and a new echo attempt is done. Once an echo reply is properly received, the first command can be issued.
Rgds
BT