Skip to content

Commit 224d0ea

Browse files
committed
Removed leftover debug traces for rng testing
1 parent da35fd5 commit 224d0ea

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

hal/stm32_tz.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,6 @@ void hal_tz_sau_init(void)
336336
#define TRNG_CR_CONFIG1_SHIFT (20)
337337
#define TRNG_CR_CONDRST (1 << 30)
338338

339-
__attribute__((noinline)) static void RAMFUNCTION trng_trace_step(uint32_t step)
340-
{
341-
(void)step;
342-
__asm volatile("" : : "r"(step) : "memory");
343-
}
344-
345-
346339
static void hsi48_on(void)
347340
{
348341

@@ -360,11 +353,8 @@ static void hsi48_on(void)
360353
void hal_trng_init(void)
361354
{
362355
uint32_t reg_val;
363-
trng_trace_step(1);
364356
hsi48_on();
365-
trng_trace_step(2);
366357
RCC_AHB2_CLOCK_ER |= TRNG_AHB2_CLOCK_ER;
367-
trng_trace_step(3);
368358

369359
reg_val = TRNG_CR;
370360
reg_val &= ~(0x1F << TRNG_CR_CONFIG1_SHIFT);
@@ -378,15 +368,11 @@ void hal_trng_init(void)
378368
reg_val |= 0x06 << TRNG_CR_CLKDIV_SHIFT;
379369
#endif
380370
TRNG_CR = TRNG_CR_CONDRST | reg_val;
381-
trng_trace_step(4);
382371
while ((TRNG_CR & TRNG_CR_CONDRST) == 0)
383372
;
384-
trng_trace_step(5);
385373
TRNG_CR = reg_val | TRNG_CR_RNGEN;
386-
trng_trace_step(6);
387374
while ((TRNG_SR & TRNG_SR_DRDY) == 0)
388375
;
389-
trng_trace_step(7);
390376
}
391377

392378
/* Never used (RNG keeps running when in secure-mode) */

0 commit comments

Comments
 (0)