cancel
Showing results for 
Search instead for 
Did you mean: 

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

Rikerq
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

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

View solution in original post

5 REPLIES 5

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
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

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

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.

I attempted with both Hyperterminal and ExtraPutty using Ymodem, but both continued to fail. The logs are both generally the same so I'm thinking its having to do with the stm software.

Rikerq
Associate II

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