force input buffer for CRC to be aligned 32 bits
Dear ST community,
I noticed that the CRC API is forcing the input buffer to be aligned 32 bits, which can be understood in order to be generic, but in the majority of the case we have a byte buffer which could be stored in unaligned in the memory or it's taken from frame where storage address is unaligned, till now it's not a problem we can cast (uint32_t *) and everything should work, except the case where the core of STM32 is Cortex M0 or M0+ so unaligned access is not supported and will lead to hard fault if the InputDataFormat is not selected to be CRC_INPUTDATA_FORMAT_BYTES .
In my opinion the exposed API with forced aligned buffer can be an error prone, there is for sure a lot of workaround that can be applied but I could prefer to add to the API CRC_Handle_8 and CRC_Handle_16 to the exposed API, with that it will solve immediately the problem and remove any usage ambiguity.
Maybe I'm wrong and I miss something.
Best regards
Bassem Taamallah
