2024-05-09 01:57 AM
Hi,
Currently, I am testing the authentication example using STSAFEA110 expansion board with X-NUCLEO-G474RE.
I follow the steps in STMicroelectronics.X-CUBE-SAFEA1_GettingStarted.pdf and also compared the STSAFEA110 expansion board+NUCLEO-L476RG Authentication.ioc to make sure that all the setting are the same.
But there is something wrong, the output is shown as below image:
When go into debug mode, found out that the status_code = STSAFEA_COMMUNICATION_ERROR.
Please advise on what is wrong and how to resolve this issue.
Thanks.
2024-05-21 05:03 AM
Hi @bay,
Thanks for your interest in the STSAFE-A110 solution.
I have tested the latest X-CUBE-SAFEA1 package and I confirm it's working fine.
To help you, could you please share your ioc file so I can have the same configuration.
Do you have the possibility to check the I2C signals ?
Best Regards,
Benjamin
2024-06-04 12:02 AM
2024-06-04 01:05 AM
Hi @bay ,
On the B-U585-IOT02A the STSAFE-A reset pin is connected to PF11, therefore you need to set this GPIO to output 0 in order to have the STSAFE-A working as mentioned in the board user manual
The issue is most probably linked to this behavior on the version 2 of the board where the logic is inverted. Therefore the code example is setting the PF11 to 1 which put the STSAFE-A in reset on this board.
you need to update the file stsafea_service_interface.c in the function HW_IO_Init(), you need to replace
/* Configure GPIO pin Output Level */
HAL_GPIO_WritePin(STSAFEA_VREG_GPIO_PORT, STSAFEA_VREG_PIN, GPIO_PIN_SET);
by
/* Configure GPIO pin Output Level */
HAL_GPIO_WritePin(STSAFEA_VREG_GPIO_PORT, STSAFEA_VREG_PIN, GPIO_PIN_RESET);
Best Regards,
Benjamin
2024-06-04 01:35 AM
Hi,
Thanks for the solution.
The I2C problem has been solved.
But now when I go into debug mode after the highlighted line,
It jumps into hardfault handler.
2024-06-04 05:18 AM
Hi @bay ,
unfortunately this code snippet which wrote the keys at the end of the flash has not been tested on U5 and therefore it’s not working.
what I would suggest is to remove it and keep the default key as static variable in your code. this means that the other example that will use the pairing key will need to modify to use static keys instead of reading them from the end of the flash.
Best Regards,
Benjamin