2016-08-03 09:29 AM
Calls to the HAL_CRC_Calculate are causing hard faults.
When I step through I found out why:switch (hcrc->InputDataFormat)
{ case CRC_INPUTDATA_FORMAT_WORDS: /* Enter 32-bit input data to the CRC calculator */ for(index = 0U; index < BufferLength; index++) { hcrc->Instance->DR = pBuffer[index]; <--- this instruction } temp = hcrc->Instance->DR; break; At the marked instruction, the hcrc handle becomes corrupt. The Instance pointer (instead of DR) gets assigned the value of pBuffer[index].Eventually the entire hcrc handle is completely corrupt, and this causes the hard fault.The code looks sound, why is this happening?Anyone have any ideas?-Matt #crc #hal2016-08-03 09:49 AM
The code looks sound, why is this happening?
You are looking at the wrong code...