2020-09-20 10:39 PM
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?
Solved! Go to Solution.
2020-09-23 10:48 AM
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.
2020-09-21 10:25 AM
Read out and check/post the RCC enable register's content. Also check, if the debugger uses correct addresses for DMA and RNG.
JW
2020-09-21 01:00 PM
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.
2020-09-23 10:48 AM
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.