cancel
Showing results for 
Search instead for 
Did you mean: 

delay block problem octospi

JJuli.1
Associate II

I am using stm32l4r board to run some tests and i am generating my code with stm32cubemx, I am having an issue with the octospi parameters

after investing with my colleagues and checking the documents we discovered it is a problem related to the delay block but i did not know how to fix it

1 ACCEPTED SOLUTION

Accepted Solutions
ChahinezC
Lead

Hello @JJuli.1​,

It seems your issue might be similar/due to the one mentioned in this thread STM32CubeL4 v1.17.1 OSPI Delay Block Bypass Problem.

In the 6.5.0 version of the STM32CubeMX there was a bug with clearing the previously mentioned bit and enabling the delay block bypass, it might be the cause of the problem you are facing.

The issue is solved from the V6.6.0 version and on.

It is always recommended to download the last version of the required tools to use, STM32CubeMX as an example.

Thank you.

Chahinez.

View solution in original post

6 REPLIES 6
ChahinezC
Lead

Hello @JJuli.1​,

I suggest you to check the DLYBYP bit of the OCTOSPI_DCR1 register to check whether the delay block is bypassed or not.

Can you please specify the CubeMX and CubeL4 versions you are using?

Regards,

Chahinez.

LCE
Principal

... and describing the problem would be helpful, too.

Just stating that you have a problem doesn't help.

@ChahinezC​ I will check the bit you mentioned when I run the application and get back to you

for the versions i use v6.5.0 and v1.17

@Community member​ i am here asking experts to help me recognize the problem!

Interesting...

Maybe start describing the "symptoms" of the probably delay block related problem.

You're not even telling us which external memory / type is connected.

Do you have any scope pictures, or register copies?

/* delay block registers for OCTOSPI1 in H723 */
printf("\n\rDLYB_OCTOSPI1->\n\r");
printf("CR   = %08lX\n\r", DLYB_OCTOSPI1->CR);
printf("CFGR = %08lX\n\r", DLYB_OCTOSPI1->CFGR);
	if( DLYB_OCTOSPI1->CFGR & DLYB_CFGR_LNGF )
	{
		u32Val = DLYB_OCTOSPI1->CFGR & DLYB_CFGR_LNG_Msk;
		u32Val >>= DLYB_CFGR_LNG_Pos;
		printf("\tvalid length = %lu\n\r", u32Val);
	}
	u32Val = DLYB_OCTOSPI1->CFGR & DLYB_CFGR_SEL_Msk;
	u32Val >>= DLYB_CFGR_SEL_Pos;
	printf("\tSEL = %lu (x UNIT)\n\r", u32Val);

Further delay block related settings are in the registers OCTOSPI1->DCR1, DCR2,

CR and CCR might also be interesting.

ChahinezC
Lead

Hello @JJuli.1​,

It seems your issue might be similar/due to the one mentioned in this thread STM32CubeL4 v1.17.1 OSPI Delay Block Bypass Problem.

In the 6.5.0 version of the STM32CubeMX there was a bug with clearing the previously mentioned bit and enabling the delay block bypass, it might be the cause of the problem you are facing.

The issue is solved from the V6.6.0 version and on.

It is always recommended to download the last version of the required tools to use, STM32CubeMX as an example.

Thank you.

Chahinez.