Author Topic: Can your program, ever damage an MCU ??  (Read 3844 times)

0 Members and 2 Guests are viewing this topic.

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 4144
  • Country: gb
  • Doing electronics since the 1960s...
Re: Can your program, ever damage an MCU ??
« Reply #25 on: September 29, 2024, 07:26:35 pm »
In an FPGA it should be possible to connect a 10k outputs all together and drive 5k to 1s and 5k to 0s :)
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11780
  • Country: us
    • Personal site
Re: Can your program, ever damage an MCU ??
« Reply #26 on: September 29, 2024, 07:40:30 pm »
You can't do that internally, I/O driver outputs are not connected inside the fabric. You can only do that if you connect the pins externally. And in that case, just apply mains to the device, it would also kill it.
Alex
 

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 4144
  • Country: gb
  • Doing electronics since the 1960s...
Re: Can your program, ever damage an MCU ??
« Reply #27 on: September 30, 2024, 09:21:55 pm »
I meant just normal bus contention internally, not shorting out loads of GPIO.

When I was doing FPGAs, you would have got loads of DRC errors/warnings however.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11780
  • Country: us
    • Personal site
Re: Can your program, ever damage an MCU ??
« Reply #28 on: September 30, 2024, 09:46:06 pm »
There is no way to cause bus contention, There are no common busses, everything inside the fabric is multiplexed. There is no physical way to cause shorts.
Alex
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28101
  • Country: nl
    • NCT Developments
Re: Can your program, ever damage an MCU ??
« Reply #29 on: September 30, 2024, 10:04:42 pm »
There is no way to cause bus contention, There are no common busses, everything inside the fabric is multiplexed. There is no physical way to cause shorts.
The older Spartan 200 series have internal busses where you can get bus contention. But don't forget that there may be invalid configurations for modern day FPGAs as well. The software avoids these but it doesn't mean it is impossible to create an invalid configuration in other ways. Having a feedback loop on all flip-flops to toggle them at maximum rate is likely going to produce lots of heat as well.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 4144
  • Country: gb
  • Doing electronics since the 1960s...
Re: Can your program, ever damage an MCU ??
« Reply #30 on: October 01, 2024, 08:36:58 am »
On the Xilinx chips I used one could have tri state gates so could create an internal bus. A long time ago. XC3000 / XC4000 IIRC.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online asmi

  • Super Contributor
  • ***
  • Posts: 2839
  • Country: ca
Re: Can your program, ever damage an MCU ??
« Reply #31 on: October 01, 2024, 01:21:04 pm »
On the Xilinx chips I used one could have tri state gates so could create an internal bus. A long time ago. XC3000 / XC4000 IIRC.
Nope it's impossible to do as there are no tristate gates inside, these things are emulated using multiplexers as was mentioned above.

Offline MathWizardTopic starter

  • Super Contributor
  • ***
  • Posts: 1626
  • Country: ca
Re: Can your program, ever damage an MCU ??
« Reply #32 on: October 01, 2024, 02:25:07 pm »
Today my new XGecu T48 should arrive. I'm hoping I'll be able to read the memory out of some old MCU from a DVD player or something, but maybe they are all pretty much locked off.

I know some old MCU's must be hackable, but yeah I think a lot of the stuff that I hear about that was hacked.....it's actually people getting the contents of a ROM chip, or some stream of data, and then doing coding, to decrypt stuff.


I was playing around with some old MCU from a DVD player that powered a VFD. It's a bit broken, or very confused some of the circuits are missing. But I'd love to get inside it, hopefully the T48 will let me do something, anything for a bit of fun. I hope I don't mess up the MCU tho.
« Last Edit: October 01, 2024, 02:27:16 pm by MathWizard »
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: us
Re: Can your program, ever damage an MCU ??
« Reply #33 on: October 01, 2024, 07:03:55 pm »
On the Xilinx chips I used one could have tri state gates so could create an internal bus. A long time ago. XC3000 / XC4000 IIRC.
Nope it's impossible to do as there are no tristate gates inside, these things are emulated using multiplexers as was mentioned above.

The XC3000 had acual three state buses internally for interconnect.  Take a look at chapter 7 of this datasheet:  https://www.mouser.com/datasheet/2/903/3000-1595472.pdf

It specifically cautions that the user needs to prevent multiple simultaneous drivers on the bus.

That's a very old part and I don't know when xilinx stopped doing that.  I'm pretty sure the Spartan 3 didn't have internal tri state buses which was the first FPGA I actually used.  Now days it's indeed all done with muxes, and if you write logic that looks a tri state bus with multiple drivers, it will turn out to be a priority encoder and if two drivers are on, whichever one the tool assigned higher priority will be selected.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15439
  • Country: fr
Re: Can your program, ever damage an MCU ??
« Reply #34 on: October 01, 2024, 08:11:15 pm »
This is something that can only be found in pretty old FPGAs. I don't know how the synthesis tools would make use of that exactly, having never used one of these.
I suppose that writing multiplexers in HDL in a "high-level" manner would probably make proper use of the tristate busses and avoid any contention, but that if you'd directly control the tristate enables with signals (a lower-level approach), then you could mess it up and damage the chip.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28101
  • Country: nl
    • NCT Developments
Re: Can your program, ever damage an MCU ??
« Reply #35 on: October 01, 2024, 09:02:42 pm »
This is something that can only be found in pretty old FPGAs. I don't know how the synthesis tools would make use of that exactly, having never used one of these.
You have missed out on a wonderful feature then  ;D I have used these plenty in my first years doing FPGA design. Bi-directional connections (busses) inside these FPGAs work like a databus between a CPU, memory and peripherals. In VHDL you'd use the 'Z' state combined with a select signal to tell the synthesizer create a tristate-buffer to drive a net. It is not fast but gives a pretty efficient use of internal routing resources if you can connect like 20 functional blocks with logic inputs / outputs to a single line.
« Last Edit: October 01, 2024, 09:04:26 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Mia Barn

  • Newbie
  • Posts: 4
  • Country: pk
Re: Can your program, ever damage an MCU ??
« Reply #36 on: October 02, 2024, 07:29:47 pm »
Yes, burning is possible thriguh the power and ground pins only. I recently burnt my ESP32
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11780
  • Country: us
    • Personal site
Re: Can your program, ever damage an MCU ??
« Reply #37 on: October 02, 2024, 07:36:20 pm »
This was not the question. It is obvious that it is possible to kill anything with incorrect power supply. The question was about software on the working hardware.
Alex
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1356
  • Country: si
  • I like to measure things.
Re: Can your program, ever damage an MCU ??
« Reply #38 on: October 02, 2024, 08:12:33 pm »
You can wear out the memory cells in flash if you repeatedly write and erase the same pages over and over again. Not a matter of seconds or minutes, but you'll eventually get there if you do it rapidly enough.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2289
  • Country: ca
Re: Can your program, ever damage an MCU ??
« Reply #39 on: October 03, 2024, 06:55:08 pm »
You remind me of the infamous HCF - Halt and Catch Fire instruction.
https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing)#Origins
Modern designs should not contain such illegal instructions.
 

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 4144
  • Country: gb
  • Doing electronics since the 1960s...
Re: Can your program, ever damage an MCU ??
« Reply #40 on: October 06, 2024, 05:03:50 pm »
Quote
That's a very old part and I don't know when xilinx stopped doing that.

The XC3000 was moved to a smaller geometry silicon (which made it run much faster and broke a lot of designs ;) ) about 20 years ago, and I was still able to buy an XC3064 about 10 years ago, from a Xilinx disti.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline Foxxz

  • Regular Contributor
  • *
  • Posts: 126
  • Country: us
Re: Can your program, ever damage an MCU ??
« Reply #41 on: October 06, 2024, 05:38:09 pm »
I had a 68HC11 or 12 program that started writing data to the beginning of RAM and didn't stop when it hit the last RAM address. I don't know if it burned some efuses or some eeprom programming values but I was never able to write a program to the eeprom again. I was still able to load programs to RAM.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf