Just got a few samples of ATMega324PB. I would like to use it instead of ATMega324P(A) in our current project. ATMega324PB should be backwards compatible with older flavors of ATMega324 but I got stucked with external AREF for ADC. To cut the long story short - I can't get it to work as supposed. When I select external AREF, ADC always reads 0x3FF on any channel I select - like AREF is not routed to the pin. On ATMega324PB it is shared with (new) PortE, but according to Microchip, if ADC is enabled and AREF set to external, pin should be automatically re-routed as an AREF input. On the other hand, if any other reference source is selected, it works as expected....
Can anybody try it out and verify my findings, or point me in the right direction if I'm doing something wrong...?