From 9485d1e2ff9c713abb9db6128d7986b0ed6b976f Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Wed, 26 Dec 2018 09:00:45 +0000 Subject: Settled for a weird DMA use in this driver. Apparently it is working, it needs complete test vectors. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12484 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- testhal/STM32/multi/CRYPTO/cfg/stm32f756zg_nucleo144/mcuconf.h | 1 + .../STM32-CRYPTO (Select ELF file)(OpenOCD, Flash and Run).launch | 2 +- testhal/STM32/multi/CRYPTO/main.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'testhal') diff --git a/testhal/STM32/multi/CRYPTO/cfg/stm32f756zg_nucleo144/mcuconf.h b/testhal/STM32/multi/CRYPTO/cfg/stm32f756zg_nucleo144/mcuconf.h index 1e5e6624a..58315d901 100644 --- a/testhal/STM32/multi/CRYPTO/cfg/stm32f756zg_nucleo144/mcuconf.h +++ b/testhal/STM32/multi/CRYPTO/cfg/stm32f756zg_nucleo144/mcuconf.h @@ -150,6 +150,7 @@ #define STM32_CRY_HASH1_IRQ_PRIORITY 9 #define STM32_CRY_HASH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) #define STM32_CRY_HASH1_DMA_PRIORITY 0 +#define STM32_CRY_HASH_SIZE_THRESHOLD 1024 #define STM32_CRY_HASH_DMA_ERROR_HOOK(cryp) osalSysHalt("DMA failure") /* diff --git a/testhal/STM32/multi/CRYPTO/debug/STM32-CRYPTO (Select ELF file)(OpenOCD, Flash and Run).launch b/testhal/STM32/multi/CRYPTO/debug/STM32-CRYPTO (Select ELF file)(OpenOCD, Flash and Run).launch index bfd40254c..918d40d5e 100644 --- a/testhal/STM32/multi/CRYPTO/debug/STM32-CRYPTO (Select ELF file)(OpenOCD, Flash and Run).launch +++ b/testhal/STM32/multi/CRYPTO/debug/STM32-CRYPTO (Select ELF file)(OpenOCD, Flash and Run).launch @@ -33,7 +33,7 @@ - + diff --git a/testhal/STM32/multi/CRYPTO/main.c b/testhal/STM32/multi/CRYPTO/main.c index 61be877f0..75d5e51e5 100644 --- a/testhal/STM32/multi/CRYPTO/main.c +++ b/testhal/STM32/multi/CRYPTO/main.c @@ -69,7 +69,7 @@ int main(void) { if (palReadLine(PORTAB_LINE_BUTTON) == PORTAB_BUTTON_PRESSED) { SHA256Context ctx256; -#if 0 + crySHA256Init(&CRYD1, &ctx256); crySHA256Update(&CRYD1, &ctx256, 0U, (const uint8_t *)""); crySHA256Final(&CRYD1, &ctx256, digest); @@ -77,7 +77,7 @@ int main(void) { crySHA256Init(&CRYD1, &ctx256); crySHA256Update(&CRYD1, &ctx256, 3U, (const uint8_t *)"abc"); crySHA256Final(&CRYD1, &ctx256, digest); -#endif + crySHA256Init(&CRYD1, &ctx256); crySHA256Update(&CRYD1, &ctx256, 56U, (const uint8_t *)"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"); crySHA256Final(&CRYD1, &ctx256, digest); -- cgit v1.2.3