-
Notifications
You must be signed in to change notification settings - Fork 143
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
Recurrent problems flashing STC15F204EA... baudrate / protocols.py confusion...! #72
Comments
Please note that this was done with a "proper" MAX232 interface, not an USB-TTL (those behave even worse!), and indeed the very same MAX232 interface I've used successfully to program both a STC15F104W and several STC89C516 & 52s... |
UPDATE:
To correctly flash and operate, these STC15F204s must be fed with at least 3V8, and the modules in question, found abundantly on typical Chinese online stores, sport AMS1117 3.3 regulators. As you can see in mine, there is provision for 0ohm resistors to bridge between either the 5V or (AMS1117 derived) 3V3 to feed the uC: Originally the 0hms were soldered to the right (3V3 route, on 'R2' mark), I de-soldered the 0ohm resistor and moved it to the left side (as 'R3') where they allow to feed STC15F204EA's with proper 5V. Now with this mod the modules flash and work flawlessly. :) As a sidenote, it's really stange that these STC15F204EAs are supposed to come in 28-pin packages, not 20 (at least if we follow their datasheet). The datasheet has interesting remark about "samples", so I don't think my modules sport fake STCs, but that maybe they (STC factory) initially planned on samples with 28-pin but then actual production was done with 20-pin packaging... who knows! In fact, in the datasheet for F204EAs: So it seems that these "STC15S204EA" (a 20-pin SOIC variant of the "normal" 28-pin F204EAs) got out of the factory with the labeling F204EA in their silks anyway. Note that in these modules datasheet (that I link right here), the IC is annotated as "STC15L204", i.e. the 3V3 version, and some of the pins imply SPI-related functions (SCK, MISO, MOSI, ...): But I don't think the 20-pin F204EAs actually soldered on these NRF24L01 prototyping modules really have a SPI implemented in hardware... I've tried to find any info on internal SPI module for these 20 and 28 pin variants, but to no avail, so I guess they just don't provide hardware ISP... By "ISP" I mean "your everyday SPI hardware" for, as you may know, STC is known by its "innovative" flashing and bootstrapping procedures, which in some cases means a real advantage in terms e.g. of not having to deal with XTALs and caps but the chips running quite fast regardless (BTW, another nice advantage is STC's provision for convenient 11.0592MHz right from the internal clock, which helps to accomodate the usual UART baud rates with a minimal probability that sync fails). On the other hand, more powerful series such as the STC15F2K60S2 do claim (and have) proper SPI in hardware, thanks in part to their higher pin counts in their PDIP 40 and PLCC 44 packagings. Alas, in the schematic above, if you change STCL204 by STCF204 (STCS204, strictly speaking) then the pins that appear labelled as P5.4 and P5.5 in silkscreen & schematics should get re-annotated as P0.0 and P0.1, respectively, see Section 1.3.3 in the STCF204EA datasheet. So between the datasheet's confusion and this somewhat dodgy supplier's substitution of the implied STC15L204s by 5V but reduced-pin count (20 vs 28) versions of the STCF204's, dozens of users like me out there were scratching their heads, even for YEARS... Mystery is now solved I guess. This being said, I'm moving now on to real use of these puppies... |
Hello.
Experiencing here tons of problems trying to flash STC15F204EAs... (I've got 3 of them, no one works)
Description:
which is the point in which things go bezerk!!! (as you can see I put a loop to gather incoming bytes even if they don't comply with the expected protocol... in an effort to diagnose it somehow...)
And please please can the author explain in layman terms to me, the relationship between the values given to the -l, -b, -t options, the initial "freq", the negotiated "freq" afterwards and the dreaded 24118400, 230400 // ...etc constants, the Python code is mostly auto-explicative but I guess better didactics would help INMENSELY in this effort...
Especially since F104W's are all around and nicely working from the outset, whereas for some strange reason there are lots of frustrated users of F204EA's out there speaking profanities about their STGAL company for nights to come... (I myself been obsessed with trying to diagnose this for an entire WEEK now, come figure...!!)
(so I've done my homework, I'm not just pestering Grigorig, as I say I've diagnosed up to the point I can and understand.... notice that at first these module/s didn't even go PAST the trimming step!!! .... that's all my modifications that got'em up to the SWITCH BAUDRATES point... but to no further avail.... :/sad:/
I'm not in any remote way criticizing Grigorig's efforts, which are only to be praised and acknowledged (there goes a 46 B9 6A 00 80 big ACK to you, man!!! You're the man, but please help me....
I am truly willing to go the extra mile, not just asking for kind help only to retire from this later. I see this precise model F204EA is not truly documented as itself... so I think a great outcome of my problem would be to come up together with a proper script / mod that allows the STC15F204EA model to benefit from STCGAL.
-D output follows. Have peace and thank you in advance!
The text was updated successfully, but these errors were encountered: