AnsweredAssumed Answered

Regression in X-CUBE-SBSFU v2 (YModem)

Question asked by Silvio Barani on May 20, 2018
Latest reply on Jun 21, 2018 by Tim Campbell



Y-modem serial transmission in X-CUBE-SBSFU 2.0.0 is not working with CP2102 and FTDI232R Virtual COM chips.
It worked with version 1.0.0 of X-CUBE-SBSFU
With default ST-Link Virtual COM port device it is working fine with both versions.


The difference between ST-Link Virtual COM and mentioned chips is that two initial y-modem header packets sent from PC app. are buffered and visible as glued together on serial wire.
On ST-Link serial wire output there is small space visible between two header packets.
YModem in v2 version tries to 'ack' immediately after receiving first packet while there is transmission ongoing - this is generating faulty response and finally transmission is broken.


While working with ST-Link serial port there is mentioned gap between packets and 'ack' is successfully sent.


In v1 there was 1s delay introduced in before header 'ack' reply so it worked fine also with glued packets.


Restoring this delay results in FTDI and CP2102 working with v2. However I don't know what was the reason to remove this delay so it could be problematic in other areas.


Potential fix is to restore v1 code:


For SFU:
File: sfu_loader.c
Function: SFU_COM_YMODEM_HeaderPktRxCpltCallback


 /* NOTE : delay inserted for Ymodem protocol*/


before return;


For Application:
File: fw_update_app.c
Function: Ymodem_HeaderPktRxCpltCallback


 /* NOTE : delay inserted for Ymodem protocol*/


before return;


Dear SBSFU team - I'm so glad with v2 updates, but looking forward to v2.0.1