I was having some issues that randomly it would seem to loose the 16mhz clock .
My "heartbeat" LED that would strobe about 4 times a second would randomly (sometimes when IRQ 0 would hit, or changed I/O's) would change to a rate of 1 flash every 2-3 seconds...
Resting the MCU would not fix it ... I would have to remove power completely to restore the 16Mhz clock.
And I had a 16Mhz xtal on PB6 & PB7. with 22pf Caps to ground. I also tried to change it to 10pF caps. still same thing ...
I am using the Adafruit 32 TQFP bearkout board.
The ONLY fix I was able to come up with was using a actual 16Mhz TTL Clock input on PB6 and that fixed everything.
It seems that the Xtal Amplifier is alittle weak on the 328pb...
Dont know if it is with the breakout board... or if is a issue with the 328pb.
SO ... if anyone is having issues with Frequency instability using atmega328pb on a Breakoutboard Try using something like this:
CTS-Frequency Controls CB3-3C-16M0000
Thought I would Share.