HW:Apm 252 SW:3.1.5 - flash chip replacement

Hi! to all members.

I have a question related mostly to 3.1.5 coding.
I have an APM 252_V5 for my Quanum Nova and have a failes flash chip ATMEL AT45DB161 (16Mbit) type.

I have to replace it with an AT45DB321 (32Mbit) type.
My question is as the two chips are completely intendical the only difference in code handling is the
chip ID byte.
Does arducopter 3.1.5 uses this type of data to intentify chip or no so I can replace with the 32Mbit flash (instead of 16Mbit) and make ot to log data again?

Thank you for your time my friends!

Alex