ERC32 System Registers

Sergei Organov osv at topconrd.ru
Thu Aug 26 12:14:42 UTC 2004


Carlos Bruno Silva <cbsilva at student.dei.uc.pt> writes:
> I'm trying to calculate the CRC of the  Erc32 System Registers (0x01f8....).
> 
> These registers are mapped in memory through the adresses like the one above.
> 
> 
> First I tried using the same technique I used to do the memory CRC, that was
> to pass the adress to my CRC calculation routine, and the length of it in
> bytes.
> 
> Since it is a 32bit registers, I passed somehing like this:
> 
> sysreg=(char*)(0x01f80000);
>   crc_sys_regs=binhex_updcrc(0,sysreg, 4);

Do it like this:

  unsigned32 sysreg = (unsigned32 volatile *)(0x01f80000);
  crc_sys_regs = binhex_updcrc(0, (char*)&sysreg, 4);

HTH

-- 
Sergei.




More information about the users mailing list