Hi, I have a little question about the crc part of the MC33771's responce ,its a simple question ,but i am a little confused.
hopefully you can solve my confuseness.
As you can see the picture taken from datasheet page58,section 6.4. as follow:
I don't know if my understanding is correct, this is my understanding :
CRC of read response is only relevant of these data——that is, it is calculated by these data ——
and CRC of write response is only relevant of these data ,that is,it is calculated by these data ——
is this understanding right?
and the crc of slave(33771)'s responce has no relevance with the CRC of command——which send by the master, is this understanding right?
if so, if the master want to check if the write operation was OK( the write command send to slave),the master has to calculate the correct CRC using those data slave supposed to responce(show in the picture above),and then compare with the actual CRC in the slave's response, right?
but if the Master want to check if read opration is OK,because Master don't know the data of slave‘s register,sure it don't know what data the slave suppose to responce, so it has to calculate CRC using the data which the slave send back in response, then compare it with the actual CRC in slave's responce. right?
Solved! Go to Solution.
Hi Huang,
Please accept my apologies for the delay in answering your question, I had to ask our apps engineer for help, please find below his response.
The CRC is used to ensure consistency (during transmission) of each individual 40 bit message on the bus and is calculated for the bits[39..8].
There is no link between the CRC of one message to the CRC of another message! To ensure READ or WRITE commands you have to check the data inside the frame.
Best regards,
Tomas
Hi Huang,
Please accept my apologies for the delay in answering your question, I had to ask our apps engineer for help, please find below his response.
The CRC is used to ensure consistency (during transmission) of each individual 40 bit message on the bus and is calculated for the bits[39..8].
There is no link between the CRC of one message to the CRC of another message! To ensure READ or WRITE commands you have to check the data inside the frame.
Best regards,
Tomas
HI Tomas:
I already solved this problem , its because I the reversed the order of the bytes I send.and I shouldn't send 0XFF either.
Best regards
Huangziyi
Hi Tomas:
Thanks for your reply very much! it solved problem solved perfectly. I'm sorry to bother you another thing, that is ,when I read the driver code of " MC33771"——offered by you in the NXP community. I think I need to learn the detail thing about the MCU MKL25Z4, I searched the internet for the MKL25Z4‘s datasheet ——which used in software development, but I can't find one, if you have MKL25Z4‘s datasheet . Appreciate it very much if you can send me one.
Best regards
Huang ziyi
Hi Huang,
Datasheet: https://www.nxp.com/docs/en/data-sheet/KL25P80M48SF0.pdf
Reference Manual: http://cache.freescale.com/files/32bit/doc/ref_manual/KL25P80M48SF0RM.pdf
Best regards,
Tomas
Hi Tomas:
Thank you very much ,you solved my problem perfectly!
Best regards,
huang ziyi