grigorig / stcgal

Open Source STC MCU ISP flash tool
678 stars 140 forks source link

recovering STC89C52RC #102

Open lynchaj opened 10 months ago

lynchaj commented 10 months ago

Hi Is there a way to recover an STC89C52RC that is no longer responding to erase commands? To reset it back to factory conditions?

I was experimenting with my STC89C52RC dev board and it work great for a while but after one program I loaded, it stopped responding to erase and reprogram commands.

Any ideas? It seems the BSL is responding at least somewhat but whatever is in the STC89C52RC is running away and not allowing me to erase it or reprogram it.

Maybe is another programmer needed with more capability to wipe the STC89R52RC?

Thanks in advance for your help

lynchaj commented 10 months ago

Hi OK, some good news. I was able to use this program at ceptimus STC89C5xProgrammer to regain control of my STC89C52RC chip. It can be found here:

https://ceptimus.co.uk/index.php/2015/12/15/isp-programmer-for-the-stc89c51-and-stc89c52/

I used the program to upload a LED blinker program that I know worked. Once the LED blinker was working, I moved the dev board over to my Linux notebook and used stcgal to check its status and then "stcgal -e" to erase the Flash memory.

Now the STC89C52RC and dev board are behaving normally. Not sure why the STC89C5xProgrammer worked when the stcgal didn't. Maybe there is a bug in stcgal?

Thanks