HDC2450 stuck in DFU mode

8 years 9 months ago #29529652 by LROBBINS
In order to update the firmware in my unit a few weeks ago I had to install and use the STM DfuSe_Demo. All was going well until this morning when the Roborun stopped connecting with the HDC2450 even though the serial LED on the unit is lit.

If the controller is turned off and back on, COM14 is briefly detected, then is quickly disconnected, and the status light gives an (unrecognizable by me) flash pattern. DeviceManager showed an STM_DFU device "functioning normally"! If I disable that device, it is re-enabled as soon as the controller is connected. If I delete that device, the computer attempts to re-install the STM-DFU drivers.

I have restarted Win7-X64 from a cold shutdown, uninstalled Roborun and the STM program, then re-installed Roborun. All to no avail. The controller still gives the flashing status light and Roborun is unable to connect with it. IT SEEMS TO BE PERMANENTLY STUCK IN DFU MODE and I am completely stuck!

Can you help me?

Ciao,
Lenny

Please Log in or Create an account to join the conversation.

8 years 9 months ago #29529653 by Griffin Baker
Replied by Griffin Baker on topic HDC2450 stuck in DFU mode
Then you need to reflash the controller again. Once the update is successful, you then need to close out the dfu loader, and then power cycle the controller.

Please Log in or Create an account to join the conversation.

8 years 9 months ago - 8 years 9 months ago #29529654 by Griffin Baker
Replied by Griffin Baker on topic HDC2450 stuck in DFU mode
The controller will go in DFU mode if it boots and immediately crashes 5 times in a row.

Crashing after boot typically happens when a faulty script is loaded in flash and the configuration is set to script auto start.

Connect the PC via serial port and run Hyperterminal or similar terminal emulation software.

If after reset, you see Starting ... followed by FID= xxxx and then Starting ... again, this is likely to get a script crash scenario. Try sending !r 0 immediately after the FID=xxx and before the next Starting ...

If Starting ... only is repeating, then press and hold the w key. The controller will display IAP and the letter C every second. You will then be able to upload new firmware/

Please Log in or Create an account to join the conversation.

8 years 9 months ago #29529655 by LROBBINS
Replied by LROBBINS on topic HDC2450 stuck in DFU mode
Thank you for your two posts. For the first one, re-flashing the controller, I'd already done that twice, with no luck.

I think that your second post is on the mark. Though I had not intended to enable autorun, and my last saved profile certainly has it disabled, I have been able to convince myself that a non-functional script is indeed running.

This is a raw CAN script, so I "sniffed" the controller's CAN lines (with USB not connected) and saw 5 startup attempts. In each one, there were several seconds of heartbeat messages (ID=701, 1 data byte = 0x05 at 100 msec intervals) and after the first two seconds (corresponding to the autostart delay) admixture of an occasional frame sent by the script (ID=1, 4 data bytes of 0xFF, 0xAA, 0x0, and 0x55). The script uses a timer and counter to send 100 of those frames at 100msec intervals, but I never get more than 5 such frames in 2 seconds before the controller tries to re-start, so the script is obviously not working as intended. (Strangely, if the USB cable IS connected, I still get as many as 17 heartbeat frames before transmission stops.)

Which now leaves me with a practical problem. I have 5 fairly "modern" computers none of which have a COM port, and 1 ancient W98 laptop with COM and LPT ports that I keep around to use with my Dynamic Controls OEM dongle. So I have to hunt up someone with a computer that has a COM port before I can kill that script.

And that leads me to a question I've been wanting to ask you, but hadn't yet gotten around to posting. Working with CAN without simultaneous serial output is an almost unworkable situation - if for no other reason than because the only way to start a script is with autorun, which is probably how I got my controller buggered. Would you be able to recommend a USB-to-RS232 adapter, or single-height PCMCIA serial card, that you have found works reliably with Roborun under Win7-x64? Until I have same, I will have to find someone with a COM port and desist from working on integrating the Roboteq into my CAN bus.

Ciao,
Lenny

Please Log in or Create an account to join the conversation.

8 years 9 months ago #29529656 by Griffin Baker
Replied by Griffin Baker on topic HDC2450 stuck in DFU mode
If the controller can see the usb for a split second, try sending in this command to the controller as soon as it tries to communicate with the pc.

terminate

This will stop the script.

You can get a serial to USB converter so you won't have to get a different pc.

www.serialcomm.com/USB_adapters/USB_conv...ct_general_info.aspx

Please Log in or Create an account to join the conversation.

8 years 9 months ago #29529657 by LROBBINS
Replied by LROBBINS on topic HDC2450 stuck in DFU mode
OK, I'll try sending "terminate", but rather doubt that I can hit it during the few milliseconds that the port is open (it never actually shows as connected).

Yes, I know that there are USB-serial adapters, but I and many others have had rather mixed results with them in a variety of circumstances. Some, for example, are OK for bulk transfers but don't work at all for single transmissions. Does the one in the link you posted work reliably with your software and Win7-x64?

Ciao,
Lenny

Please Log in or Create an account to join the conversation.

8 years 9 months ago - 8 years 9 months ago #29529658 by Griffin Baker
Replied by Griffin Baker on topic HDC2450 stuck in DFU mode
It should. We use it. It supports up to windows 8.1.

Here is another one we use. These cost a bit more.

www.serialcomm.com/USB_adapters/USB_conv...ct_general_info.aspx

More specifically:
www.usconverters.com/usb-rs232-adapter-x...f24204807ebd4481ff7f

Please Log in or Create an account to join the conversation.

8 years 9 months ago #29529659 by LROBBINS
Replied by LROBBINS on topic HDC2450 stuck in DFU mode

It should. We use it. It supports up to windows 8.1.

That's all I needed to know - I've already placed the order.

In the meantime, I was able to kill the script, though I couldn't manage to send terminate as you suggested. I was able to "fool" Roborun into giving me a green light, and it recognized the controller, asked if I wanted to retrieve configuration from controller, and then lost the controller again. Rinse and repeat several times before definitively disconnecting. Though terminate was sometimes echoed in "In data", it never killed the script. What I did was the following. Perhaps it will be useful for others.

(1) Connect unpowered Roboteq to USB port with Roborun in Console tab.
(2) enter !R 0 into "Out data"
(3) Turn on the controller
(4) As soon as a COM port opens, change "COM port" from "Auto" to the port number that's now (briefly) available. This is what gave me the alternation between "green light" and "closed"
(5) While there's a green light, click "Send" for the !R 0 message
(6) The script now stops, we get a steady green light, you can load the configuration from the controller, DISABLE AUTORUN, and save back to the controller.

I will desist from working on CAN scripting until the USB-Serial adapter is here!

Thanks for your help.

Ciao,
Lenny

Please Log in or Create an account to join the conversation.

8 years 9 months ago #29529660 by Griffin Baker
Replied by Griffin Baker on topic HDC2450 stuck in DFU mode
I'm sorry, I wasn't clear in my directions. You send the terminate command from the scripting tab.

So you write in

terminate

and then as soon as the computer tries to connect to the controller, you click on "Download to device".

Please Log in or Create an account to join the conversation.

8 years 9 months ago #29529661 by LROBBINS
Replied by LROBBINS on topic HDC2450 stuck in DFU mode
No, I'm just dense - it should have been obvious that "terminate" being a MicroBasic reserved word, it must be downloaded as a one-line script. Ciao, Lenny

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.077 seconds