- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
I have CY8CKIT-042 kit. I want to use crc component (MODBUS RTU). the CRC calculation does not match the software calculating. I didn't find mistake of crc settings.
I put attach the project copy.
Please help me! Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
File
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I'm looking right, the polynomial you have defined in the COMPONENT (0xc002) doesn't match with the one used in the code (0xA001). (Even when accounting for the bit-shift). Maybe you can verify the calculation with an online-CRC16-calculator?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried it with a polynomial function of A001, but the result still does not match crc_calculator function.
I've tested the following site,
Site:http://www.lammertbies.nl/comm/info/crc-calculation.html
Still could not do it. if you help, i would be glad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you change the hardware to use the A001 polynomial? I think this is still different from the software, since your code does the XOR after the shift, and not before.
And which values did you compare with the online calculator? (and did those results match with the other one of yours)?
Btw: there is a really large list of CRC implementations: http://reveng.sourceforge.net/crc-catalogue/16.htm#crc.cat-bits.16
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I changed the CRC polynomial A001. I want to use Modbus RTU. I want to MODBUS calculation that the calculation method of the site. What should I change CRC Compenent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The CRC component reads its data MSB first (according to page 14 in its data sheet). But you configured the SPI feeding it to LSB first...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My english is not very good. I can not exactly explain the some of things. So sorry
I tried spi(LSB) or spi-(MSB) and i changed polynomial value and seed value of CRC polynom.
Thank you very much for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Did you successfully test the CRC component for Modbus CRC16 configuration?
I am testing the component with CRC polynom = 0xA001 and seed value = 0xFFFF, but CRC output does not meet with expected result.
Coud you please give me advice how to right configure CRC component?
My testing confiration you could find in attachment.
Thank you.