Calculate rcc with stm32f10x
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-14 9:23 AM
Hi,
Here is my input data
you assume that I have 4 variables such as Data1,Data2,Data3 and Data4 that store each byte (Data1 saves d24-d31 and Data4 stores D0-D7). So I want to know how can I execute Crc-8 algorithm in these data according to datasheet with SPL library. I would appreciate give me a simple source because I don't have any Idea How I can implement this algorithm form my input data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-14 9:36 AM
You'd need to compute in software, the hardware isn't going likely to do this for you.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-14 10:23 AM
Thanks for your reply.
Actually I want to prevent my communication from noise in long distance.doesn't we have any simple CRC-8 software algorithm?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-14 10:42 AM
https://www.ien.eu/uploads/tx_etim/Page_24_25_Zettlex_42750.pdf
You'd need to provide a couple of example packets.
What is the final application here? Where will it be used?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-14 11:54 AM
It isn't that complicated, would need a couple of 32-bit data patterns to validate.
What is the final application here? Where will it be used? Please complete your profile accurately.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-14 1:19 PM
Thanks for your contributions.
Well , I have got these values:the first bytes are 000255,000098,000197
000255,000225,000029,000033
000098,000225,000029,000032000197,000225,000029,000034Actually I want to decrease and increase speed of a motor with getting valid data. but if my motor starts it tries to make a lot of noise that can destroy my input data. So I want to check crc code to be sure that each received characters are valid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-14 9:59 PM
Not able to make the maths work with those numbers..
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-15 1:39 AM
Thanks for your effort
maybe I have got the wrong result.However, thanks for your contributions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-15 8:16 AM
I don't know, post the link to the data sheet for the specific part you are using, and perhaps the logic analyzer output from the SPI transaction. The command/result phase might take 6 bytes of total transfer back/forth. Present the data as stream of 2 digit hex bytes rather than decimals, ie 0x11,0x22,0x33, etc.
I don't have a way to replicate the hardware.
I tried different initialization, shift direction, and polynomials. The manuals for these parts should provide specific byte/word sequence examples.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-18 2:52 AM
Dear Clive one
Thanks for your explanation
you are right and it was my fault because my sensor model doesn't provide the CRC calculation and I thought the first byte it is related to CRC bytes.
Thank you so much for your effort and kindness.
