Here is a session, where i enable the CRC peripheral, reset it, set data register to 0, and print data register.
Code: Select all
>>> import stm
>>> print(hex(stm.mem32[stm.RCC + stm.RCC_AHB1ENR]))
0x10000f
>>> stm.mem32[stm.RCC + stm.RCC_AHB1ENR] = 0x10100f
>>> stm.mem32[stm.CRC+stm.CRC_CR] = 1
>>> print(hex(stm.mem32[stm.CRC+stm.CRC_DR]))
-0x1
>>> stm.mem32[stm.CRC+stm.CRC_DR] = 0
>>> print(hex(stm.mem32[stm.CRC+stm.CRC_DR]))
-0x38fb2285
Is there really CRC hardware on STM32F405RG?
Any hints?
If one can get it working, one could add python access to the firmware. There seems to be HAL support ...
test vectors http://www.febooti.com/products/filetwe ... t-vectors/
crc calculator http://www.lammertbies.nl/comm/info/crc ... ation.html