AnsweredAssumed Answered

SHA-256 calculation problem on large buffer

Question asked by David Rozenski on Aug 7, 2019
Latest reply on Aug 18, 2019 by David Rozenski



I am using fsl_dcp.c driver to calculate SHA-256 and found strange problem, calling functions like :


status = DCP_HASH(DCP, &m_handle, kDCP_Sha256, (void*)0x60010000, 1000000, output, &outLength);


Never return it will be locked in this loop :


while ((base->STAT & (uint32_t)handle->channel) == handle->channel)


located in fsl_dcp.c function : DCP_WaitForChannelComplete


By removing this waiting loop it works and calculation are correct.


If length of buffer is less than 26000 (or close to this) it works.


Please advise.

Best Regards