2019-02-18 02:11 AM
Hello,
Is "instance" used just for numbering of HAL instances, or is it that the number has additional meanining in term of hardware ?
For example:
With SRAM, the instance in the SRAM example (stm32h7cube) is:
hsram.Instance = FMC_NORSRAM_DEVICE;
hsram.Extended = FMC_NORSRAM_EXTENDED_DEVICE;
...
hsram.Init.NSBank = FMC_NORSRAM_BANK3;
(
#define FMC_NORSRAM_DEVICE FMC_Bank1
#define FMC_NORSRAM_BANK1 ((uint32_t)0x00000000U)
#define FMC_NORSRAM_BANK2 ((uint32_t)0x00000002U)
#define FMC_NORSRAM_BANK3 ((uint32_t)0x00000004U)
#define FMC_NORSRAM_BANK4 ((uint32_t)0x00000006U)
)
As seen above, instance is set as "BANK #1" which is actually base address of bank 1 !!
, but NSBank in hsram.init is to to "BANK #3" (see above defines).
How is it that instance is related to bank1, and NSBank to bank 3 ?
Is it a bug ?
Thanks,
ranran