2018-01-05 11:21 PM
Hello everyone,
I am using STM32f030rc for my application. In which I want add 128bit AES encryption. For that I am referring STM32_Cryptographic _Examples. I have taken functions from AES128_CTR file. In which I am getting Hard fault after AES_CTR_Encrypt_Append function. All the arguments for this are same as in example. So I don't know why it is not working in my code? Is it with selection of series?
Thanks in Advance.
#stm32f030rc2018-01-06 09:47 AM
The Cortex-M0 is particularly sensitive to data buffer alignment.
You should look at what instructions (assembly) are actually faulting, and the CPU registers at that point. If you understand why it is faulting you might be able to solve the problem.
2018-01-07 01:40 AM
Here is screenshot of Dis
assembly
. Hard fault is coming after execution of add instruction.2018-01-07 07:13 AM
'...
and the CPU registers...'
You need to review the code within the context it is executing. Is the stack pointer properly aligned? Is the stack deep enough?