cancel
Showing results for 
Search instead for 
Did you mean: 

Error STSAFEA110 expansion board + X-NUCLEO-G474RE

bay
Associate II

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:

bay_2-1715244405871.png

When go into debug mode, found out that the status_code = STSAFEA_COMMUNICATION_ERROR.

bay_1-1715244180085.png

 

Please advise on what is wrong and how to resolve this issue.

Thanks.

 

5 REPLIES 5
Benjamin BARATTE
ST Employee

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

I have tested last time it works already.

But now I am testing stsafe using the the B-u585I-Iot02A board. 

When go into debug mode, found out that the status_code = STSAFEA_COMMUNICATION_ERROR.

bay_0-1717484384537.png

Can help to check it, I attached with the .ioc file.

Benjamin BARATTE
ST Employee

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

Hi,

Thanks for the solution.

The I2C problem has been solved.

But now when I go into debug mode after the highlighted line,

bay_0-1717490044739.png

It jumps into hardfault handler.

bay_1-1717490074665.png

 

 

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