Skip to main content
MWebj
Associate III
September 21, 2020
Solved

STM32L08x RNG and DMA not accessible

  • September 21, 2020
  • 2 replies
  • 1370 views

RNG, CRC, and DMA are all peripherals on the STM32L08x AHB bus. If I try to write to CRC_INIT before enabling CRC clock in RCC then STM32-WorkBench Memory window correctly just shows zeroes. But after enabling CRC clock in RCC_AHBENR and writing to CRC_INI, then value written is shown in Memory window.

But if I do the same with RNG or DMA then those peripheral registers aren't accessible for writing after enabling the peripheral in RCC.

Is there some special magic that has to be applied to enable clocks to those two peripherals?

This topic has been closed for replies.
Best answer by MWebj

Seems to have found the cause. CRC was enabled in STM32-Workspace pinout configuration. When I removed it then RNG and DMA could be enabled and started to work. Beats me why.

2 replies

waclawek.jan
Super User
September 21, 2020

Read out and check/post the RCC enable register's content. Also check, if the debugger uses correct addresses for DMA and RNG.

JW

MWebj
MWebjAuthor
Associate III
September 21, 2020

RCC_AHBENR is acc.to ref manual 0x40021000 + 0x30 which corresponds to address used. RCC_AHBENR is also common for CRC, RNG and DMA Clock enable so if it works for one, then it should work for the other.

Initially after start is RCC_AHBENR=0x00000100 which means that only MIFEN is set. (Checked with Workbench Memory window)

After CRCEN is set is RCC_AHBENR=0x00001100 which is correct, and default register values are seen in Memory window.

And after RNGEN is set is RCC_AHBENR=0x00101100 which is correct. But when I open Memory window at 0x40025000 which is base address for RNG then only ???????? are shown for all memory locations.

MWebj
MWebjAuthorBest answer
Associate III
September 23, 2020

Seems to have found the cause. CRC was enabled in STM32-Workspace pinout configuration. When I removed it then RNG and DMA could be enabled and started to work. Beats me why.