Skip to main content
Rikerq
Associate II
March 11, 2020
Solved

STM32L552-EV, attempting to IAP program the flash through UART connection, however always fails to send the bin file through Y-modem protocol.

  • March 11, 2020
  • 5 replies
  • 2405 views

I've been using the example AN4657 and following it to a T. I'm using the example project library files form the STM32L476G IAP_Main and modified them where necessary to work with the 552.

I can successfully connect to TeraTerm via usart3 connection and virtual COM port from the usb.

I get the menu successfully and can send commands to the uC. However, when I attempt File > Transfer > Y-modem > Send... and select the bin file... it only gets the initial packet through and then stops sending/receiving.

When I debug it I continue to get HAL_TIMEOUT from the ReceivePacket function.

I've spent many days trying to solve this to no avail. The uC is constantly sending " send next packet" commands using CRC16, and I receive "C" in the terminal,

but I just seem to get timeouts. I decreased the baud rate to 9600 to see if that caused an issue but it made no difference.

--Update--

Added Dump files from two other terminal applications besides Teraterm which also have Ymodem support.

This topic has been closed for replies.
Best answer by Pavel A.

AFAIK, Teraterm has a known bug in YMODEM, and the ST example as is does not work with it.

https://osdn.net/projects/ttssh2/ticket/37456

Try another software or try to make a workaround for Teraterm in your code.

(I'm going to do this but don't have time yet).

-- pa

5 replies

Tesla DeLorean
Guru
March 11, 2020

Be sure not to look at the USART registers in the debugger.

I would used the SWO/SWV to output telemetry. Make sure the timeout and delays are functioning correctly. Make sure the USART isn't flagging errors like framing or noise.

Comment out code writing or erasing flash to test transfer side.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Pavel A.Best answer
March 11, 2020

AFAIK, Teraterm has a known bug in YMODEM, and the ST example as is does not work with it.

https://osdn.net/projects/ttssh2/ticket/37456

Try another software or try to make a workaround for Teraterm in your code.

(I'm going to do this but don't have time yet).

-- pa

Rikerq
RikerqAuthor
Associate II
March 11, 2020

I noticed this bug you mentioned awhile back but I had thought it was just failing to send the initial packet and kept trying to push it through. I also tried HyperTerminal without success, but I'll try @Community member​  suggestion of commenting out the software parts I'm not trying to test right now.

Rikerq
RikerqAuthor
Associate II
March 11, 2020

I changed the baud rate back to 115200 and it worked! Thanks for your input. Won't be using Teraterm :)