-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STC8A64D4-LQFP44 #4
Comments
The default value STCGAL_OPTIONS is -a, which means automatic power cycling. |
I attempted the above but still ended with the same result, except the message please cycle power as appended after Waiting for MCU. stcgal -p /dev/cu.usbserial-DK0GQ2DT -t 24000 build/c3-firmware.hex |
If it helps, I have used a logic analyzer to monitor the RX/TX lines of the STC chip during this process. I see a long stream of 7F and then two instances of a response. The response is quite long: 46 B9 68 00 38 50 01 6E 3F 60 4E 20 01 FF FF BF AF FF 00 CE 7F FE 74 55 00 F7 F4 02 86 DD 2E 50 20 24 1F 1D 01 00 00 FE 04 A9 22 08 26 70 11 0A 82 B8 F4 4D 67 7E B0 15 49 16 Is this protocol documented somewhere? I assume this is part of the handshake with STC chip that put it into boot loader mode vs user application mode. |
Can you set STCGAL_OPTIONS := -D and post the output here? It will be more nicely formatted. |
That was easier than my logic analyzer :-) stcgal -D -p /dev/cu.usbserial-DK0GQ2DT -t 24000 build/c3-firmware.hex |
Ok, the data stream is corrupt. The culprit is likely pyserial, which STCGAL uses to communicate with the MCU. You could try The best solution would be to use POSIX system calls instead of pyserial, but this wouldn't work on Windows. |
I don't need it to work with windows. I only referenced windows above due to testing with the original STC-ISP. I am using OSX on a MacBook Pro M1 (ARM). |
stcgal -D -l 115200 -p /dev/cu.usbserial-DK0GQ2DT -t 24000 build/c3-firmware.hex That is the output when using -l 115200. |
Please send me an email at: vincent -dot- defert -at- posteo -dot- net |
Results Using the modified protocols.py and removing -l 115200 stcgal -D -p /dev/cu.usbserial-DK0GQ2DT -t 24000 build/c3-firmware.hex |
So I'll have to reproduce it to find the cause of the bug. Which board has the issue? Do you have a purchase link? |
I'll try to find a purchase link for the specific PCB but in the past I could only find, this one. I have that board and it programs properly. I will be traveling for the next few days but when I return I will continue to debug some on my side to understand the difference. |
Hello,
I am using a PCB that contains the STC8A64D4-LQFP44 device. The board contains a FTDI device (FT234XD-R). When plugged in the FTDI chip is powered from the USB but this rail is not shared to the PCB. I am able to program the board using a windows machine and the STC-ISP software by pressing the download button and then powering on the main part of the PCB. When I try to program using STCGAL (and make files from UNI-STC project) it sits at Waiting for MCU endlessly. Is there any suggestions you can provide on debugging this? I know the STCGAL installation works as I can program a demo board with the STC8A64D4-LQFP48 on it.
Thanks in advance.
The text was updated successfully, but these errors were encountered: