Skip to main content
Associate
October 6, 2026
Solved

STM32N6 FMC SDRAM: what does "Primary interfaces used" mean, and which pins are the primary ones?

  • October 6, 2026
  • 4 replies
  • 44 views

  Hello,

  We are designing a board with STM32N647X0H3Q (VFBGA264) and a 16-bit SDR SDRAM
  (512 Mbit, x16, 3.3 V LVTTL) on the FMC, and we would like to run SDCLK at 133 MHz
  and 166 MHz.

  In DS14791 Rev 10, section "SDRAM waveforms and timings", the text says:

    "In all timing tables, Tfmc_ker_ck is the fmc_ker_ck clock period, with primary
     interfaces and RETIME = 1:
     - Maximum FMC_CLK = 166 MHz at 20 pF for 2.7 V < VDD < 3.6 V
     Otherwise:
     - Maximum FMC_CLK = 75 MHz at 20 pF for 2.7 V < VDD < 3.6 V"

  and Tables 86 to 89 have note 2: "Primary interfaces used."

  However, I could not find a definition of "primary interfaces" anywhere in DS14791,
  RM0486, AN5967 or ES0620, and the CubeMX device database shows no difference between
  the alternative pins of the same FMC signal.

  On VFBGA264, the control, address, SDCLK and NBL signals each have only one pin, but
  every data line has two or three possible pins (all AF12), for example:

    Signal    Option 1    Option 2    Option 3
    FMC_D0    PB15        PA12        -
    FMC_D1    PB8         PA11        -
    FMC_D2    PB2         PA10        -
    FMC_D3    PB9         PA9         -
    FMC_D4    PD13        PA8         -
    FMC_D5    PB13        PA2         -
    FMC_D6    PD5         PA1         -
    FMC_D7    PB14        PA0         -
    FMC_D8    PD11        PG9         PC3
    FMC_D9    PE0         PB12        -
    FMC_D10   PE1         PB11        -
    FMC_D11   PE2         PB10        -
    FMC_D12   PE3         PB5         -
    FMC_D13   PB0         PB4         -
    FMC_D14   PB6         PC0         -
    FMC_D15   PB7         PA15        -

  My questions:

  1. What exactly does "primary interfaces" mean for the FMC SDRAM timings?
  2. Which pin for each of FMC_D0 to FMC_D15 belongs to the primary interface on
     VFBGA264? Are the control/address/SDCLK/NBL pins (single option) all primary?
  3. We may also use VFBGA178 (STM32N645I0H3Q). On that package some data lines have
     only one option (for example FMC_D0 = PA12 only). Which pins are primary on
     VFBGA178, and is 166 MHz possible there at all?

  Thank you in advance.

 

 

Best answer by STOne-32

Dear ​@Yulai ,

Thank you for the question, we will add a clarification for the pins /IO belonging to the primary interface in our documentation.

 

Here are the full conditions for FMC_CLK :

Maximum FMC_CLK =166 MHz at 20pF  for 1.71V<VDD<1.9V.

Maximum FMC_CLK =166 MHz at 20pF  for 2.7V<VDD<3.6V.

  • Primary interface ( see below)
  • SYSCFG_FMC_RETIMECR = 0x2:
  • FMC_SDRAM_RPIPE_DELAY = 1;

Regards,

STOne-32

Port Name

Primary interface

PE11

FMC.SDNWE

PE14

FMC.SDNE[0]

PE5

FMC.SDNE[1]

PE6

FMC.SDCKE[1]

PE15

FMC.SDCKE[0]

PE13

FMC.NCAS

PE12

FMC.NRAS

PD2

FMC.A[0]

PD6

FMC.A[1]

PD7

FMC.A[2]

PD10

FMC.A[3]

PE7

FMC.A[4]

PD12

FMC.A[5]

PD0

FMC.A[6]

PD1

FMC.A[7]

PD15

FMC.A[8]

PD14

FMC.A[9]

PD3

FMC.A[10]

PD4

FMC.A[11]

PE8

FMC.A[12]

PE9

FMC.A[14]/FMC.BA[0]

PE10

FMC.A[15]/FMC.BA[1]

PD8

FMC.NBL[0]

PB15

FMC.D[0]

PB8

FMC.D[1]

PB9

FMC.D[3]

PD5

FMC.D[6]

PD13

FMC.D[4]

PB2

FMC.D[2]

PB13

FMC.D[5]

PB14

FMC.D[7]

PB3

FMC.NBL[1]

PD11

FMC.D[8]

PE0

FMC.D[9]

PE1

FMC.D[10]

PE2

FMC.D[11]

PE3

FMC.D[12]

PB0

FMC.D[13]

PB6

FMC.D[14]

PB7

FMC.D[15]

PD9

FMC.SDCLK

PP7

FMC.D[23]

PP6

FMC.D[22]

PP5

FMC.D[21]

PP4

FMC.D[20]

PP3

FMC.D[19]

PP2

FMC.D[18]

PP1

FMC.D[17]

PP0

FMC.D[16]

PO4

FMC.NBL[2]

PO5

FMC.NBL[3]

PP15

FMC.D[31]

PP14

FMC.D[30]

PP13

FMC.D[29]

PP12

FMC.D[28]

PP11

FMC.D[27]

PP10

FMC.D[26]

PP9

FMC.D[25]

PP8

FMC.D[24]

4 replies

STOne-32
STOne-32Best answer
ST Technical Moderator
October 6, 2026

Dear ​@Yulai ,

Thank you for the question, we will add a clarification for the pins /IO belonging to the primary interface in our documentation.

 

Here are the full conditions for FMC_CLK :

Maximum FMC_CLK =166 MHz at 20pF  for 1.71V<VDD<1.9V.

Maximum FMC_CLK =166 MHz at 20pF  for 2.7V<VDD<3.6V.

  • Primary interface ( see below)
  • SYSCFG_FMC_RETIMECR = 0x2:
  • FMC_SDRAM_RPIPE_DELAY = 1;

Regards,

STOne-32

Port Name

Primary interface

PE11

FMC.SDNWE

PE14

FMC.SDNE[0]

PE5

FMC.SDNE[1]

PE6

FMC.SDCKE[1]

PE15

FMC.SDCKE[0]

PE13

FMC.NCAS

PE12

FMC.NRAS

PD2

FMC.A[0]

PD6

FMC.A[1]

PD7

FMC.A[2]

PD10

FMC.A[3]

PE7

FMC.A[4]

PD12

FMC.A[5]

PD0

FMC.A[6]

PD1

FMC.A[7]

PD15

FMC.A[8]

PD14

FMC.A[9]

PD3

FMC.A[10]

PD4

FMC.A[11]

PE8

FMC.A[12]

PE9

FMC.A[14]/FMC.BA[0]

PE10

FMC.A[15]/FMC.BA[1]

PD8

FMC.NBL[0]

PB15

FMC.D[0]

PB8

FMC.D[1]

PB9

FMC.D[3]

PD5

FMC.D[6]

PD13

FMC.D[4]

PB2

FMC.D[2]

PB13

FMC.D[5]

PB14

FMC.D[7]

PB3

FMC.NBL[1]

PD11

FMC.D[8]

PE0

FMC.D[9]

PE1

FMC.D[10]

PE2

FMC.D[11]

PE3

FMC.D[12]

PB0

FMC.D[13]

PB6

FMC.D[14]

PB7

FMC.D[15]

PD9

FMC.SDCLK

PP7

FMC.D[23]

PP6

FMC.D[22]

PP5

FMC.D[21]

PP4

FMC.D[20]

PP3

FMC.D[19]

PP2

FMC.D[18]

PP1

FMC.D[17]

PP0

FMC.D[16]

PO4

FMC.NBL[2]

PO5

FMC.NBL[3]

PP15

FMC.D[31]

PP14

FMC.D[30]

PP13

FMC.D[29]

PP12

FMC.D[28]

PP11

FMC.D[27]

PP10

FMC.D[26]

PP9

FMC.D[25]

PP8

FMC.D[24]

YulaiAuthor
Associate
October 6, 2026

  Thank you very much, this is very helpful.
  One follow-up: on VFBGA178 (STM32N645I0H3Q), PB15, PB8, PB9, PB13 and PB14 are not bonded, so FMC_D0/D1/D3/D5/D7 can only use PA12/PA11/PA9/PA2/PA0. Does this mean that x16 SDRAM on VFBGA178 is limited to 75 MHz (3.3 V), or is there another primary option on that package?

STOne-32
ST Technical Moderator
October 6, 2026

Dear ​@Yulai ,

Indeed, this is correct and if we need x16 SDRAM at 166MHz, the choice of the package is key.

Regards,

STOne-32

YulaiAuthor
Associate
October 7, 2026

OK. In that case, we have to abandon VFBGA178 and switch to VFBGA264 instead. Thank you again.