arm: Simple delay function because of an chicken and egg problem

2 Mar
2022
2 Mar
'22
10:06 p.m.
Hi,
I'm running into an chicken and egg problem when modifying (fixing) some drivers for STMicroelectronics SoC's.
The problem, I will implement a timeout, when accessing some registers. Unfortunately I cannot use the basic mdelay() or higher level functions, which use this function, because there on these SoC's there isn't setup and enabled the timer before. Also the ARMv7-M SysTick timer will not be used.
I could write a simple delay loop which counts down at the frequency from the processor speed. But I think, this is not a good idea.
Any suggestion, what I can do? I'm still new in U-Boot, so I don't know if there a simple delay function exists.
Thanks in advance!
Johannes K.
1164
Age (days ago)
1164
Last active (days ago)
0 comments
1 participants
participants (1)
-
Johannes (krjdev) Krottmayer