I am using a custom built arduino UNO for some personal projects. I am using a custom optiboot bootloader given by Nick in this post. This was done to prevent the three LED flashes on digital pin 13.
I have noticed a weird thing with the setup. During normal operation, I am able to reset it by pulling the reset pin low. Sometimes, my microcontroller freezes due to noise and I am unable to reset it by pulling the reset pin low. However powering it off and back on still works.
I am wondering what could be a possible cause for this. Is
it the custom bootloader or whether power on reset is different as compared to normal reset? Is there a way to ensure atmega328 always resetting through reset pin? Can noise affect the chip and make it behave in such a way?
After some google searches, I found an issue where people disable the reset pin functionality by setting a fuse but this doesn't seem to be that case because I am able to reset the chip during normal operations.
Updates and edits:
@Nick - Bootloader seems to be working fine. I have ruled out any issues due to the bootloader that you provided because I am having similar issues with original ones as well.
Custom arduino has all the necessary circuit elements - including reset pin pullup 10K resistor and 1N4148 protection diode. I am able to program and run the code without any trouble.
Sometimes, due to electromagnetic noise, the atmega locks up. GPIO doesn't work. Here is a separate question explaining this.
During tests, I leave the board running and wait for that hang-up to occur. During this time period, I deliberately try to induce noise in ac lines (by switching on/off appliances, turning the fan regulator knob etc). When it hangs up, I try to reset it by pulling the reset pin low using a wire. Sometimes it resets and sometimes it doesn't. When it doesn't, the only way out is to power it down and power it up back again.