How to clear CRC output register on MPC5643L?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to clear CRC output register on MPC5643L?

1,432 Views
fangfq
Contributor III

Hi,

I would like to know how to clear the CRC unit OUTP when I want to start a new CRC check sequence and abandon all the history values. This seems not an option based on the reference manual. Is it possible?

Or does the history value get auto cleared after the OUTP reading?

Thanks,

Tags (1)
0 Kudos
Reply
7 Replies

1,188 Views
medhedibasly
Contributor III

I recently worked on a SW driver for the CRC unit on MPC5748G, i faced the same problem and i found a way to solve this.

when i get the final CRC value i clear the INP register by writing 0x0000000 to it, then i clear the CSTAT register by writing  0xFFFFFFFF, this clears directly the OUTP register and you can restart a new CRC calculation without resetting your MCU ☺.

pastedImage_1.png

0 Kudos
Reply

1,188 Views
fangfq
Contributor III

Hi Peter,

Thanks for the reply. But how do you define "new check is started"? Can you give a more detailed explanation? It was not described in the reference manual. And if I start to write new data, the HW seems still calculate continued with the old value.

0 Kudos
Reply

1,188 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

The CRC holds the last result values, until new check is started.

Then the last result values are overwritten by actual ones.

You cannot change it by clearing register.

Peter

0 Kudos
Reply

1,188 Views
fangfq
Contributor III

Hi Peter,

 

Thanks for the reply. But what is the definition of "new check is started"? Can you give a more detailed explanation? It was not described in the reference manual. And if I start to write new data, the HW seems still calculate continued with the old value.

0 Kudos
Reply

1,188 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

The new check started really means when the new check is started by SW within one reset sequence.

Peter

1,188 Views
fangfq
Contributor III

I tested this feature with JTAG. And the CRC result is not cleared after the OUTP reading. So is there anyway I can clear the existing CRC result and start a new CRC calculation sequence?

0 Kudos
Reply

1,188 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

This register is read only. Writes has no effect.

After reset it contains value 0xFFFF_FFFF

pastedImage_1.png

I expect that register is not cleared on read. I will verify it tomorrow in office and let you know.

Peter

0 Kudos
Reply