Comments (9)
I tried with two PL2303 cables, both made by VTOP, and see exactly the same problem on both.
I'll get a few USB-RS232 adapters with other chipsets to see if the problem is chipset-specific vs. happening with all USB-serial adapters - serial programming cable combinations.
On the other hand, I do not see such a problem with the USB programming cable from Digi, which apparently uses an FT232RL internally.
from openrabbit.
You might need to make tcdrain()
a compile-time option. In my initial Windows test, processor verification errors out almost immediately.
reset rabbit
loaded 873 bytes from ../../../DCRABBIT_9.62/Bios/coldload.bin
flushing data for baudrate set
set baudrate to 2400
Warning: Processor verification sequence failed!
Error: Status line should be low before sending initial loader.
Or maybe not. Even with reverting back to usleep(15000)
it failed. I'm guessing it's something with the serial ioctl code. I'll try to do a serial port capture later to see what's happening.
Edit: Oops, it wasn't even getting to the part where it sends coldload.bin
. When I added some debug printf()
calls, I found that it wasn't reading DSR (TIOCMGET
never set TIOCM_DSR
).
from openrabbit.
I've now tried PL2303RA, PL2303GT and PL2303TA. Neither works (only checked with the tcdrain codepath).
Intend to test with some non-Prolific chips (CH340G and FT231XS) later.
Wonder if this is a hardware shortcoming vs. a Linux driver issue.
from openrabbit.
The old usleep(15000) method works with PL2303GT and PL2303TA, but not PL2303RA.
from openrabbit.
For more reliability, we may have to take a current time reading, send the serial data, and then have a timeout based on start_time_ms + bytes_sent * ms_per_byte + timeout_ms
. Wait for the STATUS
line to change or for the current time to exceed the calculated timeout. In the calculation, timeout_ms
would allow for some leeway and be at least 100ms, maybe longer.
from openrabbit.
For now, I'm wondering if there is a bug in the PL2303 Linux driver, so I opened a ticket there:
https://bugzilla.kernel.org/show_bug.cgi?id=209359
But even if that one gets fixed or we implement a workaround, there is still the checkum error with PL2303RA.
from openrabbit.
We might want to add a verbose mode, or some sort of logging to aid in debugging. It'd be interesting to see ALL bytes that come back. I know that the RFU code flushes the receive buffer before it expects the target to send any data, and we might want to do that right before "Tell her we're done with initial loader." in rabbit.c
.
It might be necessary to use a logic probe to monitor the TX/RX pins of the programming cable to see what actually goes out on the wire. There are some options for monitoring data sent to/from the tty, but that all happens before the Linux driver.
from openrabbit.
Just to document this somewhere:
All the PL2303 I tested had the same idProduct. But they had different bcdDevice:
PL2303RA: 4.00
PL2303GT: 3.05
PL2303TA: 3.00
from openrabbit.
In 9fcddfe a --slow option has been implemented for the usleep()-fallback.
from openrabbit.
Related Issues (20)
- make distcheck broken HOT 2
- Improve speed HOT 4
- (configure) option for DC8 mode? HOT 1
- Doesn't really work with DC 9.62A pilot.bin HOT 4
- Auto-detect secondary loader format HOT 4
- Segfault running openrabbitfu without any parameters HOT 1
- Create "build" directories for building and then add to .gitignore HOT 1
- Windows doesn't support symbolic links, so openrabbitfu doesn't work HOT 1
- Out-of-tree build fails
- Display human-readable processor information HOT 5
- Low Dhrystone performance HOT 12
- program start by RFU? HOT 10
- Add README to examples with build instructions HOT 1
- Make crt0 use a configuration that is likely to work well with many programs HOT 5
- Not working with CH340G USB-serial adapter
- stdcbench fails self-test in c90lib-lnlc.c HOT 2
- Make it cross-platform HOT 2
- Intel hex support HOT 3
- openrabbitfu missing in distribution tarballs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openrabbit.