2018-11-05 12:24 PM
Using STM32CubeProgrammer to connect to my discovery board. Connection to the board via ST-Link is lost within 30 seconds every time.
things I have done:
1.) Performed "full chip erase" via the STM32CubeProgrammer application
2.) Selected the appropriate external loader for my discovery board
3.) Tried to program the included demo file (STM32769I-DISCO_DEMO_V1.0.0_FULL.hex) but it never completes before the board disconnects
4.) Tried every combination of the "mode" and "reset mode" selections offered in the application
5.) Searched the forums for an answer and posted a support ticket to ST.... no response
Does anyone have any suggestions of next steps to try??
Solved! Go to Solution.
2018-11-07 11:27 PM
I'm afraid that looks like hardware defect to me. You've ruled out cables, power supply and you can program the internal flash successfully (for the blinky), so the external flash is causing trouble, I guess. The reset pulses can hardly be internally caused as the watchdogs are neither activated automatically nor by firmware, so probably by the STLink.
Very littel hope, I suppose. You could try to program the whole internal flash with random data and read back this to verify that all sectors are ok, just to confirm it's not the internal flash. Write protection is not likely either, as STLink Utilily would certainly detect this at the very beginning.
With the external flash: Check that signals on all 4 data lines and CLK, CS are clean rail-to-rail, as far as I recall it the pads are well accessible for a scope. If no problem there, the last resort I can think of is openocd with the patch http://openocd.zylin.com/#/c/4321/. Activating full debug might give a clue, and it's possible to check and modify all configuration registers of the flash chip. But this will need considerable amount of work and time ...
2018-11-07 11:48 PM
Hi Andreas,
Update... suddenly ... and inexplicably ... The board now stays connected. Aside from running the tests reported above I have changed absolutely nothing. Same USB port and cable, same supply setup, same options selected in the utility tool, etc...
I have successfully programmed the demo app, then moved on to the Alexa AVS app for this board.
Both are working fine.
I'd like to be happy about this but not having an answer as to why makes me nervous. I suppose I push on and if problems reappear I will buy another board.
Thanks for the help on this, it has been an education. Onward and upward (hopefully with a persistent connection!)
all the best,
brad
2018-12-27 11:37 AM
I am running into a somewhat similar problem with the STM32 Discovery kit IoT node for STM32L475 MCU. I have figured out some clues as to what is going on, but I don't have a final solution yet. I am posting what I have learned so far in case it helps someone else.
I was trying to get the AWS demo to work on the board and I kept losing communications between the debugger and the board. To troubleshoot the problem, I tried using the ST-LINK Utility and just connecting to the board without doing anything else. Here is what I get:
14:12:51 : ST-LINK SN : ***********************
14:12:51 : V2J32M22
14:12:51 : Connected via SWD.
14:12:51 : SWD Frequency = 4,0 MHz.
14:12:51 : Connection mode : Normal.
14:12:51 : Debug in Low Power mode enabled.
14:12:51 : Device ID:0x415
14:12:51 : Device flash Size : 1MBytes
14:12:51 : Device family :STM32L4x1/L4x5/L4x6
14:13:07 : Disconnected from device.
14:13:07 : Connection to device is lost: check power supply and debug connection.
14:13:07 : If the target is in low power mode, please enable "Debug in Low Power mode" option from Target->settings menu.
I tried different cables and running through a powered USB hub and got the same results. I then tried using a different computer and everything worked fine. I next tried using an instance of an Oracle VM VirtualBox virtual PC (fresh installation of Windows 10 Pro) running on the same PC that was giving me troubles. That also worked fine.
Now I am going through the painful process of figuring out what is causing the problem when I run on my Dell Precision M4800 laptop but not causing a problem when I go through a virtual PC running on the same laptop.
2018-12-27 01:46 PM
DELL tends to install assorted junk into the OS on the Upper or LowerFilters (Storage Device Stack), something like an Intel Performance tool, and some Remote Diagnostic tool.
Search the forum for the "UpperFilters" term, or using REGEDIT on your system, might yield a couple of nodes.
2018-12-28 07:37 PM
Clive,
Thanks for your advice. It really helped. Before I received your reply, I tried uninstalling the software associated with a Western Digital My Passport external USB drive. That helped a lot (the connection would hold for about 14 minutes instead of just a few 10's of seconds). Once I uninstalled the Dell SupportAssist software, that took care of the rest of the problem.
2018-12-28 08:38 PM
Excellent, thank for posting back.
2021-04-25 02:37 PM
I have completely the same issue...
Erased all internal and external mems. Then tried to program. Internal is programmed (menu is displayed except the images located in external mem. ) but failed to program external mem. every time.