SWRA667 January   2020 CC1312PSIP , CC1312R , CC1314R10 , CC1352P , CC1352P7 , CC1352R , CC1354P10 , CC1354R10 , CC2642R , CC2642R-Q1 , CC2652P , CC2652R , CC2652R7 , CC2652RB , CC2652RSIP

 

  1.   Cryptographic Performance and Energy Efficiency on SimpleLink™ CC13x2/CC26x2 Wireless MCUs
    1.     Trademarks
    2. 1 Abbreviations and Acronyms
    3. 2 Introduction
    4. 3 Benefits of Cryptographic Acceleration in Embedded Security Solutions
    5. 4 TI Drivers for SimpleLink MCUs
      1. 4.1 Power Management Overview
      2. 4.2 Return Behavior
        1. 4.2.1 Runtime Overhead
      3. 4.3 Efficient Power Management
    6. 5 CC13x2/CC26x2 Crypto Peripherals
      1. 5.1 AES and Hash Crypto Accelerator
      2. 5.2 Public Key Accelerator
        1. 5.2.1 ECDH Power Management Driver Example
      3. 5.3 TRNG
    7. 6 Benchmarks
      1. 6.1 AES and Hash Crypto Accelerator Based Drivers
        1. 6.1.1 AES CBC
        2. 6.1.2 AES CCM
        3. 6.1.3 AES GCM
        4. 6.1.4 AES CTR DRBG
        5. 6.1.5 SHA-224
        6. 6.1.6 SHA-256
        7. 6.1.7 SHA-384
        8. 6.1.8 SHA-512
      2. 6.2 PKA Engine Based Drivers
        1. 6.2.1 ECDH
        2. 6.2.2 ECDSA
        3. 6.2.3 ECJPAKE
      3. 6.3 TRNG Based Drivers
        1. 6.3.1 TRNG
    8. 7 Conclusion
    9. 8 References
    10.     Appendix: Plots of Blocking vs Polling Performance

Return Behavior

The drivers on the SimpleLink CC13x2/CC26x2 devices support three types of return behavior: blocking, polling, and callback.

  • Blocking return behavior involves the driver pending on a semaphore until the hardware completes the operation. The running task blocks until an asynchronous event such as an HWI or SWI posts the semaphore when the operation is complete. Blocking return behavior is synchronous from a caller perspective.
  • Polling return behavior involves continuously polling a hardware or software flag until the operation completes. The device remains in active power state and does not enter idle power state. Polling return behavior is synchronous from a caller perspective.
  • Callback return behavior involves the initial function call triggering the operation and then returning. When the operation completes, an application provided callback function is called. Callback return behavior is asynchronous from a caller perspective.

There are restrictions on the context an application is permitted to make a call depending on the return behavior configured. Table 1 lists the permitted calling contexts by configured return behavior.

Table 1. Restrictions on Calling Context by Return Behavior

Task SWI HWI
Blocking Allowed Not allowed Not Allowed
Polling Allowed Allowed Allowed
Callback Allowed Allowed Allowed

The choice of return behavior is influenced by the application design. If your application makes crypto calls from an asynchronous state machine in interrupt context or an event driven task, you should choose polling for short operations and callback for long ones. If your application makes crypto calls from a synchronous task, you should choose polling for short operations and blocking for long operations.