I'm using at91sam3s8b(cortex-M3) for my project.The hardware board connects to PC using USB port. The firmware contains some cryptographic algorithms (it includes shifts, Xors, memory substitution operations). The algorithm output is correct when the board is powered on but it starts to fail as time passes.
The master clock is configured at maximum (64 MHz).
my observations are:
if I lower the MCK frequency the failure rate decreases. (it's not related to the frequency decrease rate. The failure completely fades if I use a frequency of 55 MHz)
If I raise the board temperature the failure happens sooner and if I lower the temperature enough the failure fades again!
Some micro-controllers fail (the most of them). but some others do not. (even at an artificial temperature of 85 degrees of centigrade)
The malfunctioning boards and hardware are sent to Atmel for test. they conducted a few electrical tests and answered there is no problem relating to our board or their micro-controllers.
Any idea how or where I can track this Issue? Any technical suggestion?
Edit:
More information:
- The project is being built using keil 4.7
- The cryptographic routines are implemented in assembly and c and are linked to the main project as static libraries (there is 2 separate libraries. assembly is built using code sourcery).
- changing the order of libraries in the project displaces the fault to another algorithm. changing the name, place or declarations of some functions removes or displaces the fault.
- The hardware board is simple. a microcontroller, a USB port and a SPI flash memory(winbond serial nand flash) + that little LED. The USB port and SPI flash are not used in the simplified test code which is still faulty.