Clear, thank you @jee for providing your ioc file, at the beginning, I was able to obtain a different result from yours because I was using the Bank1 in my test.
Actually, the value obtained in your generated code was expected, in fact:
- The Nor LCD, consist of 4 banks: NE1/2/3 and 4
- Each bank has the size of 64MB
- The default FMC base address is 0x6000 0000
Using your configuration, which is FMC Bank4, the start bank Register Address will take the value of 0x6C00 0000 (0x6000 0000 for NE1, 0x6400 0000 for NE2 and 0x6800 0000 for NE3), with the default FMC base address, which explain the result found by you when you did not change the Base address in CubeMX.
Now, with 0x6C00007E FMC base address, the bank register address will take 0x6C00007E + 0x0C00 0000 which is 0x7800 007E (note: the #define FMC_BANK3_REG represent the Bank register address and not the base address set on CubeMX).
Hope my answer helped you, when your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Thanks, Khouloud