cancel
Showing results for 
Search instead for 
Did you mean: 

About running the Authentication routine serial return 6 in STSAFE-A110 in stm32l151 using X-CUBE SAEFA1

ll132435
Associate II

我使用 X-CUBE SAEFA1 在 stm32l151 上的 STSAFE-A110 中运行身份验证例程,串口返回 6 或卡住,寻求帮助

ll132435_0-1721119519161.png

 

 

5 REPLIES 5
ll132435
Associate II

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

ll132435_0-1721119726889.png

 

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

Thanks for your reply.

I use the routine generated by STM32CubeMX, and the package X-CUBE-SAFEA1 is version 1.2.2. I can share my.ioc file with you. I use IIC2 and USART2 for serial port

ll132435_0-1721282836712.png

I don't have  configurations when I create a project

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

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