Skip to content

Commit

Permalink
STM32F4_CRC: use correct CRC data
Browse files Browse the repository at this point in the history
The STM32F4 CRC engine uses the MPEG2 polynomial and configuration. This
is different from most other CRC engines, and is somewhat surprising.

This patch fixes renode/renode#585

Signed-off-by: Sean Cross <sean@xobs.io>
  • Loading branch information
xobs committed Feb 16, 2024
1 parent f1544a2 commit 7219b7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Emulator/Peripherals/Peripherals/CRC/STM32F4_CRC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class STM32F4_CRC : BasicDoubleWordPeripheral, IKnownSize
{
public STM32F4_CRC(IMachine machine) : base(machine)
{
crc = new CRCEngine(CRCPolynomial.CRC32, init: 0xFFFFFFFF, xorOutput: 0xFFFFFFFF);
crc = new CRCEngine(CRCPolynomial.CRC32, init: 0xFFFFFFFF, xorOutput: 0, reflectInput: false, reflectOutput: false);

DefineRegisters();
Reset();
Expand Down

0 comments on commit 7219b7c

Please sign in to comment.