
Jieli Forced Downloader V2.0
PROJieli Forced Downloader V2.0
License
:MIT License
Description
Previously, a version of Jerry's forced download tool has been made, which can force AC690n and ac692n series chips to enter ISD mode and download firmware through the USB port of the PC.
Build your own Jerry Experimental Board https://oshwhub.com/pla155/my-jerry-lab-board ,which has the first version of the schematic in this open source project;
Those things about Jerry AC690N (1) USB_KEY https://oshwhub.com/article/about-jieli-ac690n-usbkey This article is the principle analysis and code explanation of the forced download tool;
Those things about Jerry AC690N (2) Disassemble a downloader https://oshwhub.com/article/analysis-a-jieli-downloader I bought the official downloader to learn and learn from.
What is the second version of the downloader, is there any flaws and problems in the first version?
In fact, no, the first version is already fully capable of downloading;
The reason why there is a second version is mainly because there are some new attempts in hardware and more requirements in software.
Let's talk about hardware first;
Because the first version uses FSUSB42MUX (MSOP10), this USB switch is very easy to use, but it is a bit expensive, and it costs ¥2.7 on TB;
I just want to see if the cheap ¥1.6 FSUSB42UMX (UMLP-10) can be used by me;
In addition, there is also a disassembly FSUSB30MUX (MSOP10) of ¥0.35 on TB, which is cheap, packaging and friendly;
The second hardware reason,
It is the power management module that uses Ti's 2561A, with current protection function, although it is also garbage, but there are very few on hand, try to replace it with cheap PMOS;
The third hardware reason is the need for appearance and operation, hoping to make the buttons plugged in and placed, and add a cover to prevent accidental triggering;
Finally, in order to be compatible with the experimental platform combination module mentioned at the beginning of the article, a hardware version with a soft cable interface is required.
Let's take a family photo,
Take a look at the module effect of the soft cable connection
installed, and the keycaps are level with the top plate, which is not easy to touch by mistake;
Let's take a look at how the LED lights are lit
The green light is off, the shutdown mode, the target board is powered off, and the target board DP DM is disconnected from the PC;
The green light is always on, the power supply is ready, and the output to the target board is normal;
The red light is always on, indicating that the target board is online and can be burned;
Red light flashing slowly (1Hz), standby mode (normal power supply, offline);
Red light flashes (about 5Hz), during the forced connection process, try to shake hands 5000 times;
In terms of software, due to demand, changes have also been made:
Normally, we want to download the firmware to the ROM for execution, which requires two states, online and offline;
Online execution of downloads;
Offline, power off, restart, execute the program just downloaded to the ROM;
Sometimes, it is necessary to temporarily change the connection of the DuPont wire to allow the target board to switch to a power-down state;
Correspondingly, the action of the button is to press to enter the online download, wait for the download to complete and then press it to achieve offline operation;
If you press and hold the button, the power will go out.
Other than that;
ISD_download.exe can download the code to the RAM area and execute it immediately, after going online, the code is downloaded to RAM through USB and executed immediately.
There is no need for a power loss and restart process in the middle;
Therefore, in order to cooperate with this way of working, you only need to press a button to complete a power off and connection.
Different compilation modes require different operation processes of the downloader to cooperate, so that it is more efficient;
I want to maintain the flexibility of mode selection without adding buttons.
The method of detecting the button status of the microcontroller is used to select the working mode.
Press and hold the button, connect the downloader to USB, select the RAM mode, and power off and then connect each time.
Release the button, connect the downloader to USB, select ROM mode, press the button for the first time, press the button again, power off, offline, and run the ROM code; Long press the target board to power out.
The previous code was written,
The core code of this version retains the assembly, and the main program is C language programming, which is convenient for everyone to modify by themselves.
The core code of this version retains the assembly, and the main program is C language programming, which is convenient for everyone to modify by themselves.
Pay attention to the burning options, as shown in the picture
The options to pay attention to have been marked and need to be specifically confirmed.
In order to be compatible with STC15F104W and STC15F104E, only Timer0 is used, so you can burn according to the chip you have in your hand.
The code is no more than 512 bytes, and the STC15F100 series will probably work.
I used the AC6903B4 to test, and when I saw this, the online connection was successful;
Paste a circuit diagram, it looks convenient
Talk about how you feel;
In fact, the very small package of FSUSB is also relatively easy to solder, no problem;
PMOS works very well, and you can save 10 yuan a piece of power protection circuit;
The TVS diode of the USB preamp is really difficult to solder.
The drawing board is cool for a while, and the welding is tearful;
One sentence should be followed: "Do not add entities unless necessary";
If you can't do it, don't draw a B on the board, it's really tiring;
I actually used two male molds to suppress the inductor, I'm really crazy.
Finally, add a measured conclusion:
When Jerry forces the downloader and the USB to serial device to be connected to the same USB_HUB device, there will be a situation where the target board cannot be stably guided into the online state, which is true;
But there are also solutions,
The banknote ability can be replaced with a HUB with MTT function to solve the problem once and for all;
What should I do if I don't have money?
It's not that there is no way;
Actual test: FT232 and CP2012 will not interfere with the work of the forced downloader when the software has turned off the serial port function.
Even if you forget to turn it off before pressing the online button, it can be automatically connected after closing the serial port without having to press the button again.
CH340 is relatively troublesome, and it needs to be forced to power off to avoid interference;
So, is there no way to integrate the USB_HUB and CH340 downloaders?
Nor is it,
You can make these three power off at the same time and power on your colleagues;
It is best to place the downloader in port 1 of the HUB.
FYI.
Have fun everyone.
Designed by pla155 (from OSHWHub)
Design Drawing


Comment