Why is the MCP23S17 device getting too much hot suddenly and randomly Raspb 4A?
I don't know yet if this could be the optimal or final solution. But I have realized when overcurrent starts at my circuit.
By the moment during a week under test I can &quot;say&quot; when it happens: when I handle wires driving other logic state value and push one of them into the GPIO input pin hole.
My python control sw:

configures bank A as inputs with Rpull up, bank B as outputs that writes '0' value every time.

gives me feedback about when an input toggle its input value by console.


When overheating has started it has been showing how a long toggle-switching is produced before get the stable/final value. As long as toggle time is, too closer to start the undesired situation system is. That makes sense with CMOS literature about switching inputs and overheating.
I have done a hw debouncig to an input with a 1uF capacitor and switching has minimized until almost being completely avoided. But it seems not to trigger the overconsumption. I have not any more overconsumption after debouncing. At least one of the causes here seems to be this.
And so according with this discovering:
It seems to mean that I should be using a number of capacitors = 64 (1 capacitor for every GPIO pin on my board). At this point I don't know whether 64 capacitors is too much or not, it is good or not, etc. I don't use to see examples with one capacitor at every MCU GPIOs that will have more switching value time than my design.
I'm now working on this point.