STM32CubeProgrammer Failing (Read Failed) Immediately After Flash

43 views
Skip to first unread message

Phillip McMullen

unread,
Mar 20, 2024, 5:05:34 PM3/20/24
to Desktop Pick and Place
Hi,

I am trying to flash my CHMT48VB with Smoothieware for use with OpenPNP. I am hooked up via an STLINK-V3SET to the adapter board it came with. I changed the write protection flags in Cubeprogrammer and was able to erase the chip. Target information is reporting back chip info so it looks like it's hooked up fine. 

I am able to fully erase the chip, read from the chip, etc., but it runs forever and the times I've gotten it to "finish", it's reported back "Read failed". It's been running for about an hour or so now and still isn't finished. Here's a screenshot of my screen. I did a full read of the chip and it looks like it matches the contents of main.hex. It just errors right at the end with "Read failed".

badstm32.png


I'm very new to openpnp/STM32, however, I have a lot of years as an embedded engineer so I can hook up scopes/other equipment if needed. Just lost on where to go from here. I don't know if that long of an upload time is normal, as well as if the output looks like it's uploading properly. The upload to the same address is where I'm concerned, but I don't know if that's just how STM works and it uploads to one address and then moves it to the next slot in the actual flash. 

Any help is appreciated. Thanks!

Phillip McMullen

unread,
Mar 20, 2024, 5:11:45 PM3/20/24
to Desktop Pick and Place
I also forgot to include: I have the vacuum pumps and screen unplugged from the main board, screen RS422 wires are hooked up to the StarTech adapter but the StarTech is not powered up during the flashing process. The light on the CHMT board with designator "ST" is blinking constantly at around the 5-10Hz I heard is normal for Smoothieware.

Here are some pictures of the board wiring and the STLINK. Please let me know if you need me to get any more pictures/info.

board.jpg

stlink.jpg

Niels Moseley

unread,
Mar 20, 2024, 6:05:41 PM3/20/24
to desktop-pic...@googlegroups.com, Phillip McMullen
Hi Philip,

Flashing a 64K device shouldn't take long. Try the .bin file from the git repository. The flash address should be 0x08000000 if it asks for it. I am not familiar with the Smoothieware CHMT firmware so I can't help you with expectations.

Regards,
Niels.
--
You received this message because you are subscribed to the Google Groups "Desktop Pick and Place" group.
To unsubscribe from this group and stop receiving emails from it, send an email to desktop-pick-and-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/desktop-pick-and-place/9efc25a7-8fe8-47bc-ab62-0e7da64cf1c6n%40googlegroups.com.

Phillip McMullen

unread,
Mar 20, 2024, 6:37:04 PM3/20/24
to Desktop Pick and Place
Hi Niels,

Thanks for the quick reply! The hex is 528KB and the bin file is 192KB. It didn't ask for the address for the hex file but the BIN did.

It's running right now with the bin manually set to 0x08000000 and so far it's been going for 10 minutes. I'm not sure if that's expected with this chip? It shows it's uploading 1024 bytes per second, that should be right around 8.6 mins. Unless there's something going on where it's constantly reuploading the same chunk because it's not verifying?

All write protection is turned off as well. Same with read protection set to AA. And no problem on the CHMT knowledge. I'm just looking for any pointers. I'm used to other microcontrollers where it's a few seconds upload. I figured the hour loading couldn't be normal.

Phillip McMullen

unread,
Mar 20, 2024, 7:33:12 PM3/20/24
to Desktop Pick and Place
Okay...I'm an idiot

It takes about a second or two to upload the code. It was working all along. The "Uploading" messages I was getting are because of that "Live Updating" flag I had turned on. It constantly polls the chip for it's memory to read.

My OpenPNP setup is broken which is the reason it wasn't responding to commands. I got it working currently.

Thanks for the quick reply still. I need a drink now haha

Niels Moseley

unread,
Mar 20, 2024, 8:38:34 PM3/20/24
to desktop-pic...@googlegroups.com, Phillip McMullen

Ha, I've never seen that Live Update option as I never use CubeMX to update.
Glad you got it working. Enjoy your drink!

/Niels.

karl...@charmhigh.com

unread,
Mar 21, 2024, 5:35:46 AM3/21/24
to desktop-pick-and-place

Hello friend
Friend, have you modified our machine?
Normally we do not recommend modification
What effect do you want to achieve by modifying the machine?
Our technicians are all on business trips recently. I will ask the technicians tomorrow.

Thanks & best regards
Ellen Meng

Hunan Charmhigh Electromechanical Equipment Co., Ltd.
Address: 
104-604, Building D, Jindao Industrial Park, No.179 Huizhi Middle Road, Changsha High-tech Development Zone, Changsha City, Hunan Province, China
Telephone: +86 731 8550 4084     Fax: +86 731 8550 4064   
Mobile Phone/WeChat/WhatsAPP/Skype:0086-18974948067
Website Address:  
YouTube Home Page Address:

--
board(03-21-17-38-06).jpg
stlink(03-21-17-38-06).jpg
Reply all
Reply to author
Forward
0 new messages