Skip to main content
Associate III
Nov 1, 2026 3:44 AM UTC
Question

Differential clock enable for HyperRAM interface in STM32N657

Hello Team,

We have developed custom board using STM32N657. We are using HyperRAM P/N: S80KS5122GABHI023 in our design.

We are configuring HyperRAM at clock frequency 100MHz in DDR mode. When we measure clock on PO5 port, Inverted clock is not available but on PO4 port clock is available.

Could you guide us for register setting to get differential clock on both PO4 and PO5 ?

Below is schematic for reference

 

Your quick response is highly appreciated.

Thanks

10 replies

KDJEM.1
ST Technical Moderator
Nov 2, 2026 8:51 AM UTC

Hello ​@kadam ;

 

Could you please share the PO4 and PO5 waveforms?

What is the value of INVCLK bit in the advanced I/O configuration?

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
kadamAuthor
Associate III
Nov 2, 2026 10:58 PM UTC

Hello Kaouthar,

Thank you for sharing the register details.

Previously, we had not assigned any value to this register. We have now configured it to 0x00400000.

Could you please review this setting and confirm whether 0x00400000 is the correct value for the PO5 port?

Due to the unavailability of the oscilloscope, we are currently unable to measure the waveform.

Thanks

KDJEM.1
ST Technical Moderator
Nov 3, 2026 8:17 AM UTC

Hello ​@kadam ;

 

Which register is configured with 0x00400000 value? Is GPIOO_ADVCFGRL register?

I’m waiting to see the waveform.

Also, could you please check your hardware and pins configuration?

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
kadamAuthor
Associate III
Nov 3, 2026 9:18 AM UTC

Hello Kaouthar,

Yes, we have write 0x00400000 value in GPIOO_ADVCFGRL register.

I will share waveform as soon as possible.

Thanks

kadamAuthor
Associate III
Nov 4, 2026 2:02 PM UTC

Hello Kaouthar,

I have checked on oscilloscope clock is not coming on PO5.

Could you please suggest us how we can generate negative clock on PO5? Please suggest other registers configurations.

PO4 waveform

 

PO5 waveform

 

Thanks

KDJEM.1
ST Technical Moderator
Nov 5, 2026 9:05 AM UTC

Hello ​@kadam ;

 

Are you able to see the XSPIM data waveforms?

Could you please check your hardware?

Could you please share your configuration and the memory datasheet?

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
kadamAuthor
Associate III
Nov 5, 2026 3:10 PM UTC

Hello Kaouthar,

With Below configuration, we are not able to generate Differential clock.

In STM, we have configured registers as per below

1. XSPI1 — HyperRAM controller configuration
DTR bit readback = 1
prescalar=1 clk=100000000

XSPI DCR1 = 0x04190300
XSPI DCR2 = 0x00000001
XSPI DCR3 = 0x00000000
XSPI CR   = 0x10000301

CCR before = 0x01002101
CCR after  = 0x2D002101

The controller is configured for a 100 MHz XSPI clock, based on  clock calculation and prescaler.
CCR comparison
Field  Before  After
CCR  0x01002101  0x2D002101
IDTR (bit 29)  0  1
ADDTR (bit 28)  0  0
DDTR (bit 27)  0  1
ABDTR (bit 26)  0  1

diagnostic confirms:
IDTR  = 1
ADDTR = 0
DDTR  = 1
ABDTR = 1

 

2. PO5 NCLK inversion
GPIOO ADVCFGR[0] before = 0x00000000
GPIOO ADVCFGR[0] after  = 0x00400000
PO5 INVCLK mask = 0x00400000

The PO5 inversion bit is being set successfully:
GPIOO->ADVCFGR[0] |= GPIO_ADVCFGRL_INVCLK5;

 

In HyperRAM, we have configured registers are per below


1. CR0 — drive strength configuration
CR0 Register Readout: 0x2F8F
CR0 before = 0x2F8F
CR0 new value = 0x2F8F

 

2. CR1 register
Old CR1 = 0xFFC1
New CR1 = 0xFF81

 

Also, I have attached D0-D7 waveform for your reference.

Kindly guide us to resolve our issue.

Thanks

 

kadamAuthor
Associate III
Nov 10, 2026 3:48 AM UTC

Hello Kaouthar,

Thank you for your support.

We are able to generate differential clock for HyperRAM.

Thanks

KDJEM.1
ST Technical Moderator
Nov 10, 2026 7:36 AM UTC

Hello ​@kadam ;

 

Glad to know that the issue is solved.

What is the issue? Is it a hardware issue?

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
kadamAuthor
Associate III
Nov 20, 2026 1:34 AM UTC

Hello Kaouthar,

We have updated pin configuration settings for Differential clock pins configuration as suggested by you.

Thank you for support.

Thanks