2025-09-04 11:30 AM
Hey all,
For reference I am enabling the https server using NetxDuo Stack for firmware update in my device.
Initially we were using Internal Flash but now we are interested in External Flash particularly SDRAM. I was able to boot the application code from SDRAM, however i am facing a problem, whenever i call a rest API like GET request a hardfault occurs where the stack traces shows it is originated over _nx_crypto_sha256_update() function in the nx_crypto_sha2.c file over the use the memcpy(). The strange thing is everything works with no hardfault when application work in Internal Flash.
Furthermore, I am able to run RTOS on SDRAM and i can ping my IP on ethernet as well.
Kindly someone help me out for this, i will be grateful.
Also if i should report this behavior somewhere else?
Thanks
2025-09-04 12:26 PM
Perhaps show a register dump and code at the Fault
What memory addresses is the memcpy() acting on? Is it aligned?
An effective Hard Fault dump of registers, stack and opcodes will help get some action, as would a minimally buildable project illustrating the failure.
2025-09-04 12:32 PM - edited 2025-09-04 12:59 PM
The memcpy at the entry or exit?
How are you allocating the memory being used to store structures?
The memcpy's are typically acting on the context's buffer when the inputs are feed in blocks other than 64 byte multiples. Perhaps instrument the calling to see the flow dynamics prior to the hard fault failure. Perhaps you can use that to extract a minimally failing test case?
Check alignment of context buffer. Is that also in SDRAM ?