2024-07-16 01:47 AM
2024-07-16 01:48 AM
I use X-CUBE SAEFA1 to run the Authentication routine in STSAFE-A110 on stm32l151, the serial port returns 6 or is stuck, ask for help
2024-07-17 01:00 AM
Hi @ll132435 ,
Thanks for your interest in STSAFE-A product.
The error 6 is STSAFEA_BUFFER_LENGTH_EXCEEDED which append only when you are requesting more bytes than the STSAFE-A internal buffer (507 bytes) but in the authentication() example, there is a read of 4 bytes so this issue shouldn't happened.
Could you please share the version of the X-CUBE-SAFEA1 package ?
Could you also please share the init of the STSAFE-A110 before calling authentication() ?
Thanks,
Best Regards,
Benjamin
2024-07-17 11:09 PM - edited 2024-07-17 11:10 PM
2024-07-22 02:33 AM
Hi @ll132435 ,
I'm trying to reproduce your test on a nucleo L152 board.
In the mean time I see that you are not allocating much memory to the heap and stack.
When using MbedTLS, you may need more memory, could you have a try with the a heap of 0x2000 and Stack of 0x4000 ?
Best Regards,
Benjamin
2024-07-22 08:58 AM
Hi @ll132435 ,
I have tested on STM32L152 with your IOC project and it's working fine.
Could you please try to capture the I2C communication if any on your board ?
Best Regards,
Benjamin