Other Parts Discussed in Thread: SHA-256
Tool/software:
Hello,
I'm trying to set up a sha-256 hash using SDK for AM263Px v1.0.31 (on a HS-SE device) for a relatively large area of memory. Data is based in flash memory but from description on SDK pages DMA isn't set up yet, so I am copying data from flash into a local buffer first. Buffer size is currently 256b for simplicity (same as nvm page length).
Initialisation is copied from the crypto_sha_256_main.c example. I call DTHE_open() and DTHE_SHA_open() respectively, and set it up for sha256.
I then use the multishot flag with DTHE_SHA_compute() - set to FALSE initially, only setting to TRUE for the last block. There's a state manager here which sequentially steps through the image data in memory, processing it per 'chunk'. I keep the dthe_sha driver open whilst the conversion is ongoing - i.e. only call DTHE_SHA_close() once after all chunks are processed.
For the first 'chunk', i receive a positive response from DTHE_SHA_compute(). There is intermediate data in the digest, further indicating the hash calculation was done successfully.
However, at the moment, I am seeing a warm reset occur directly after the call to DTHE_SHA_compute(). Reset reason is 0xB - cause unknown. I'm a bit surprised by this, suspect there is some configuration missing somewhere - possibly from HsmRT. AFAIK the HSM watchdog (as well as all watchdogs on the R5F) are currently disabled,
Is this way of doing multishot sha256 hashing ok? Are there any steps missing from my procedure?
If so - does anyone have any pointers as to what 'unknown' reasons could be causing this warm reset?
Thanks