Electrical – Atmega328p reset not working

avrresetspi

I have 3 devices on SPI: Atmega328P, ZM5202 and flash with CS.
When I connect Reset of Atmega to GND I cannot talk with other ZM5202. And then I am reading id of avr also.
When avr programming:
AVR Reset -> reset of programmer
ZM5202 Reset -> Gnd
CS -> high
Result: OK

When Memory programming:
AVR Reset -> Gnd
ZM5202 Reset -> Gnd
CS -> low
Result: OK

When ZM5202 programming:
AVR Reset -> gnd
ZM5202 Reset -> programmer reset
CS -> high
Result: NOK

but

When ZM5202 proramming:
AVR Reset -> floating
ZM5202 Reset -> programmer reset
CS -> high
Result: OK

In programming cycle I can set timings:
I switch on the power for 100ms then 100ms off and after that on again for programming routine.
Do You have idea why AVR is not in reset when Reset pin connected to GND?
Fuses are not blocking ResetPin. They are low:FF, high:DA, ext: FD

Best Answer

When ZM5202 programming: AVR Reset -> gnd; ZM5202 Reset -> programmer reset; CS -> high; Result: NOK

No surprises here: The AVR turns on its ISP interface in Reset and drives one of the SPI lines, preventing the ZM5202 from doing the same.

It would also try to read the data as ISP commands, so you could end up with erased or modified memory on the AVR by accident.

AVR Reset -> floating

The AVR has a weak internal pullup on its reset pin. This means floating => not in Reset.