cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L08x RNG and DMA not accessible

MWebj
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
MWebj
Associate III

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.

View solution in original post

3 REPLIES 3

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

JW

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
Associate III

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.