Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I'm trying to create a CRC16 (poly 0x1021, initial value 0x0000), and ideally I would like the UDB's to do the serial input XOR (i.e. not using the EXTCRC function).
I'm simulating to confirm the device using the cy_psoc3_dp.v model in the warp sim library and despite having looked at how I should configure and connect the UDB's, I can't get any sensible operation from the simulation.
So firstly I observe that the CRC_v2_40 module in the library uses EXTCRC calculations for the feedback, and I can't find an example that uses the internal feedback, which makes me concerned that there might be an issue with the internal feedback.
Also when I look at the simulation model, cfbo from the least significant byte comes from sir ^ msbo, but I need to feed in the external serial in, into route_si. PSoCCreator will not allow me to feed it into sir (it only expects chaining signals).
I would have expected that in the cfbo equation that sir would be replaced by an s_r_source.
Making this change to the model, gets it running (but still not calculating the correct CRC). But now I'm wondering if I should just be using the EXTCRC mode, or whether there is an issue with the simulation model and/or hardware?
I believe that there is a stock CRC component for UART. Also, UART Rx is typically slow (115kbd) and involves some interrupt processing anyway, so simple software implementation might suffice for CRC check.