cancel
Showing results for 
Search instead for 
Did you mean: 

CRC 32bit

SOLVED
jay0909
Member
Solved!

CRC 32bit

Hi,

 

      i am communicating with stm 32 via UART. The frame i receive is      "1C000000B0B80700040400000000000000" and the CRC of the frame is " 9D0351B5". its not matching the calculation of the crc which i do, the calcuated crc is " 226F9471" . I tried the calculation with python and other sources calculated crc works fine. If anyone how to solve, pleas elet me know. 

45 REPLIES 45
crossrulz
Knight of NI

Re: CRC 32bit

Any clue about the code the microcontroller is running?  There are many variations on CRCs, so you pretty much need to know what algorithm is being used in order to get it to work.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Norbert_B
Proven Zealot

Re: CRC 32bit

Also things like high byte/low byte ordering are important which could "swap" by communication protocols.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Highlighted
jay0909
Member

Re: CRC 32bit

nope. I don't know that info. but i know the CRC calculation is according to the IEEE 802.3 standard. Also Communication is Little Endian. 

Norbert_B
Proven Zealot

Re: CRC 32bit


@jay0909 wrote:

[...] Also Communication is Little Endian. 


Are you sending the data litle endian?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
jay0909
Member

Re: CRC 32bit

Hi

 

   Nope I recieve in Little Endian, as per the UART specs. I cannot send becos of the CRC problem. 

Norbert_B
Proven Zealot

Re: CRC 32bit

Can you post your VI which includes the receiver part?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
billko
Proven Zealot

Re: CRC 32bit

I believe there is a nice set of CRC vis in the VIPM.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
PalanivelThiruvenkadam
Active Participant

Re: CRC 32bit

If it's works fine in python it should also work in LabVIEW.
Check with the way it's implemented in python and in LabVIEW and find the difference
Basic CRC is add all the data other than header .
----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
jay0909
Member

Re: CRC 32bit

Message contains a hyperlink Message contains an attachment

Hi,

 

         The attachment contains the code of the recieving end. I have segregated according to the frame format last 4 bytes after data is the CRC.

 

PalanivelT : Please read the whole post carefully.