Wiznet makers

Aimee0

Published December 19, 2023 ©

17 UCC

5 WCC

1 VAR

0 Contests

0 Followers

0 Following

STM32F411 W5500 Coremark Test over SSL

This project is a test to compare the performance of two case.
First is using two stm32, and Second is using one stm32 to send data over SSL.

COMPONENTS Hardware components

STMicroelectronics - STM32F411RE

x 1


WIZnet - W5500 Ethernet Shield

x 1


PROJECT DESCRIPTION

Overview

This project is a test to compare the performance of two case.
First case is using two stm32, send data that receving via spi communication from another stm32 to OpenSSL server on PC.
Second case is using one stm32, only send data to OpenSSL server on PC.
In both cases, the same amount of data is transmitted in the same cycle.

Test condition

  • CPU : stm32F411RE
  • CPU Clock : 100MHz
  • SPI : 25Mbps / Full duplex / use DMA
  • send data size : 2048
  • send data cyclel : 10ms
  • PC server : OpenSSL v.3.1.4
  • Benchmark : Coremark v1.0 (Iteration 10000)

Hardware

<Dual MCU test>

  • SPI2

STM32(PB13) <--- (CLK) ---> STM32(PB13)

STM32(PB14) <--- (MISO) ---> STM32(PB14)

STM32(PB15) <--- (MOSI) ---> STM32(PB15)

 

  • SPI1

STM32(PA5) <--- (CLK) ---> W5500

STM32(PA6) <--- (MISO) ---> W5500

STM32(PA7) <--- (MOSI) ---> W5500

 

<Singel MCU test>

  • SPI1

STM32(PA5) <--- (CLK) ---> W5500

STM32(PA6) <--- (MISO) ---> W5500

STM32(PA7) <--- (MOSI) ---> W5500

 

Software

<Structure>

  • Dual MCU test 

In the first case, on Board1 there are two tasks created: a send task and a coremark task. The send task is responsible for transmitting data via SPI, while the coremark task executes the Coremark tool.
On Board2, when SPI data is received, triggering an interrupt, the send task is executed by releasing a semaphore.
The send task sends the received data to the openssl server over the w5500.
To prevent SPI interrupts before transmitting, a stop signal is sent to the SPI master via GPIO pins. Once the transmission to the server is complete, a start signal is sent.
 

  • Single MCU test

Second case, there are two tasks created: transfer tasks and core mark tasks. The transmission task serves to transmit data through the W5500, and the core mark task executes the core mark tool.

<mbedTLS configuration>

MBEDTLS_AES_COption to enable the module supporting the AES encryption algorithm.
MBEDTLS_BASE64_COption to enable the module performing Base64 encoding and decoding.
MBEDTLS_BIGNUM_COption to enable the module used for large integer operations.
MBEDTLS_CAMELLIA_COption to enable the module supporting the Camellia encryption algorithm.
MBEDTLS_CERTS_COption to enable the module providing authentication functionality using pre-defined certificates and keys.
MBEDTLS_CIPHER_COption to enable the module handling symmetric and asymmetric encryption algorithms.
MBEDTLS_DEBUG_COption to enable logging and debugging features.
MBEDTLS_ENTROPY_COption to enable the module ensuring secure random number generation.
MBEDTLS_MD_C / MBEDTLS_MD5_COptions to enable the module supporting hash functions.
MBEDTLS_OID_COption to enable the module handling Object Identifiers (OIDs).
MBEDTLS_PLATFORM_COption to enable the module allowing platform-dependent function replacement in the mbedTLS library.
MBEDTLS_RSA_COption to enable the module supporting RSA encryption and digital signature algorithms.
MBEDTLS_SHA256_COption to enable the module supporting the SHA-256 hash function.
MBEDTLS_SHA512_COption to enable the module supporting the SHA-512 hash function.
MBEDTLS_SSL_TLS_COption to enable the module supporting the TLS/SSL protocols.
MBEDTLS_X509_USE_COption to enable the module using X509 certificates.
MBEDTLS_X509_CRT_PARSE_COption to enable the module parsing X509-formatted certificates.

 

MBEDTLS_ECP_MAX_BITSOption to set the maximum number of bits used in elliptic curve cryptography.
MBEDTLS_ECP_WINDOW_SIZE_ENABLEOption to enable window-based optimization in elliptic curve cryptography.
MBEDTLS_ECP_WINDOW_SIZEOption to set the window size used in elliptic curve cryptography.
MBEDTLS_ECP_FIXED_POINT_OPTIME_ENABLEOption to enable fixed-point-based optimization in elliptic curve cryptography.
MBEDTLS_ECP_FIXED_POINT_OPTIMOption to set the fixed-point optimization used in elliptic curve cryptography.
MBEDTLS_ENTROPY_MAX_SOURCES_ENABLE / MBEDTLS_ENTROPY_MAX_SOURCESOptions to enable and set the maximum number of entropy sources for random number generation.
MBEDTLS_SSL_MAX_CONTENT_LEN_ENABLE / MBEDTLS_SSL_MAX_CONTENT_LENOptions to enable and set the maximum content length in TLS/SSL.
MBEDTLS_SSL_CIPHERSUITES_ENABLE / MBEDTLS_SSL_CIPHERSUITESOptions to enable and set the TLS/SSL cipher suites.

 

MBEDTLS_HAVE_ASMOption to enable assembly code optimization.
MBEDTLS_NO_UDBL_DIVISIONOption to disable the default implementation for integer division for integers larger than 64 bits.
MBEDTLS_PLATFORM_MEMORYOption to specify that the mbedTLS library should use platform-specific memory management functions.
MBEDTLS_AES_ROM_TABLESOption to store tables used in AES encryption in ROM to conserve RAM.
MBEDTLS_ECP_NIST_OPTIMOption to enable optimizations for NIST curves.
MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES / MBEDTLS_NO_PLATFORM_ENTROPYOptions to disable the use of default entropy sources or platform-provided entropy sources.
MBEDTLS_CIPHER_MODE_OFB / MBEDTLS_CIPHER_MODE_XTSOptions related to enabling symmetric encryption modes.
MBEDTLS_ECP_DP_SECP256R1_ENABLED / MBEDTLS_ECP_DP_SECP384R1_ENABLED / MBEDTLS_ECP_DP_CURVE448_ENABLEDOptions to enable ECC-related parameters.
MBEDTLS_KEY_EXCHANGE_PSK_ENABLED / MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED / MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED / MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENAVLED / MBEDTLS_KEY_EXCHANGE_RSA_ENABLED / MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED/  MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED / MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED / MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED / MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED / MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLEDOption to enable various key exchange methods.
MBEDTLS_SSL_PROTO_TLS1_2Option to enable secure communication using the TLS 1.2 protocol.

 

Test Result

Dual MCU

Single MCU

 

CoreMark scores were 170.17score higher with the Dual MCU.

 

The time to send data was 89.8% faster with the Dual MCU.
 

 

 

Documents
  • STMF411_W5500_SSL_Comparative_Test

Comments Write