- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Known someone which polynomial code i must use for the CRC16 generator PSOC1 (CY8C29466)? The polynomial for the CRC16-IBM or CRC16/ARC is X16+X15+X2+1 I try with the polynomial 0xC002 and seed 0x0000 , but without a good result. The CRC16 generator is coupled with the same input of the Rx8 receiver and both data-inputs are inverted. The system works but i have a wrong CRC result. Have someone a suggestion ? Thanks!
Solved! Go to Solution.
- Labels:
-
PSoC1 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The difference between CRC-16 BYPASS and CRC16/ARC you will see in the docu below there are Refin= TRUE and Refout=TRUE. The polinomial 0xC002 and seed 0x0000 is OK !
RefIn =TRUE means that we reflect the bits in each byte of input. RefOut=TRUE means that we reflect the bits of the remainder(we reflects all bits not in each byte but all 16 bits). My working solution: reflect each input byte and send this byte to the CRC-16 inputDataStream ( i am use a SPIM) reflect the 16bit remainder after CRC16_stop() (CRC16_wReadCRC) and its work ... Please Note if you use a SPIM the clock that you use is the half of speed on the output a higher clock is desirable, also the clock sync is important see the datasheet SPIM and CRC16 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @lucsaerens ,
The polynomial and the seed value are OK. Kindly check if both the User Modules, CRC16 and Rx8 are set to the same ClockSync setting. Also, kindly note that if the CRC is read while the data is being received, the result may not be correct.
Also, you may check another scheme. Connect the CRC16 inputs to Rx8's RxDataOut and DataClockOut. Kindly refer to Figure 3. Rx8 Timing Diagram, last two waveforms.
Best regards,
Sampath Selvaraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I checked the clock settings (both are Sync to SysClk ), I stop always the CRC16 and then read the CRC result. And also I changed the scheme , my thanks for your suggestions, but unfortunately without result. So i looked to the AN CE58788 and i did a test -> the result is with the polynomial 0x8810 and seed 0x0000 corresponds to a CRC-16-CCITT XMODEM and with seed 0xFFFF to a CRC-16/CCITT-FALSE. With polynomial 0xC002 and seed 0x000 corresponds to a CRC-16 BYPASS. I am still searched for he CRC-16/ARC, the polynomials 0x8005, 0xA001 and 0x4003 are not given the requested results ( also with dropped X0-term). With input 1234567890 is the CRC16/ARC result = 0xC57A.
best regards, and thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The difference between CRC-16 BYPASS and CRC16/ARC you will see in the docu below there are Refin= TRUE and Refout=TRUE. The polinomial 0xC002 and seed 0x0000 is OK !
RefIn =TRUE means that we reflect the bits in each byte of input. RefOut=TRUE means that we reflect the bits of the remainder(we reflects all bits not in each byte but all 16 bits). My working solution: reflect each input byte and send this byte to the CRC-16 inputDataStream ( i am use a SPIM) reflect the 16bit remainder after CRC16_stop() (CRC16_wReadCRC) and its work ... Please Note if you use a SPIM the clock that you use is the half of speed on the output a higher clock is desirable, also the clock sync is important see the datasheet SPIM and CRC16 .