LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRC 32bit

Solved!
Go to solution

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. 

0 Kudos
Message 1 of 46
(5,319 Views)

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.


GCentral
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
0 Kudos
Message 2 of 46
(5,294 Views)

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.
0 Kudos
Message 3 of 46
(5,275 Views)

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. 

0 Kudos
Message 4 of 46
(5,271 Views)

@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.
0 Kudos
Message 5 of 46
(5,269 Views)

Hi

 

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

0 Kudos
Message 6 of 46
(5,265 Views)

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.
0 Kudos
Message 7 of 46
(5,262 Views)

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.
0 Kudos
Message 8 of 46
(5,238 Views)
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.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 9 of 46
(5,204 Views)

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. 

0 Kudos
Message 10 of 46
(5,197 Views)