cancel
Showing results for 
Search instead for 
Did you mean: 

I am using STM32L475 at HCLK 72MHz, at this clock the number of wait states required is 4 but I configured for 2 wait states and ART enabled. At this condition, my controller performance is good w.r.t timing taking.

HBoyi.1
Associate II

I increased to 4 wait states and tested and performance is not reaching w.r.t time and taking more time to complete the functions.

Do I need to increase to 4 wait states?

7 REPLIES 7

There is no *guarantee* of proper functioning if you don't fulfill the datasheet/manual requirements.

JW

HBoyi.1
Associate II

NA

Earlier we worked with F103 and migrating to L475. In F103 for the same clock, they mentioned 2 wait states and but for the same clock in L475 they mentioned 4 wait states. Because of this, my timing is increasing and it is undesired. Even ART enabled with 4WS, I am not reaching the target.

Do you have any other suggestions?

Danish1
Lead II

You might find that 2 wait-states works on your test board at room temperature.

But as JW says, ST do not guarantee that it will.

ST have good reasons for specifying 4 wait states. They know that some batches of chips might come out slightly faster and others slightly slower. And that temperature and supply-voltage also affect speed.

There might be certain combinations of address sequence, combined with FLASH that is nearing the limit of allowed write-cycles so the "raw" read might have occasional bit-errors (remember that L4 has error-correction-coding on FLASH), where the full 4 cycles are needed to ensure that the FLASH is read correctly.

So if you're just playing, and want to see how fast you can go with no real worry when you start getting unexpected behaviour, then you may violate the data sheet.

But if you're making things that are sold to other people, and have a reputation to protect or people that depend on the correct functioning of the item, then it's best to comply with the data-sheet.

Regards,

Danish

I have enabled the ART with 4 wait states and there is not much reduced in timing.

(Enabled the ART means enabled the prefetch, ICEN and DCEN)

I am trying to run from RAM for critical functions, will it improve even ART enabled?

> I am trying to run from RAM for critical functions, will it improve even ART enabled?

It may, but there are many factors to it, it's hard to tell even seing your code and impossible without knowing the details.

JW

Uwe Bonnes
Principal III

Put timing critical functions in RAM!