Secure Write and Read to SPI Flash (CYW943907AEVAL1F)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ChMa_3922746
Level 5
Level 5
10 likes received 10 likes given 5 likes given

I've been combing through the code and documents trying to figure out if the following added to the make file will enable the AES encryption of data that is written to, and read from, the SPI flash:

PLATFORM_SECUREDCT_ENABLED := 1

PLATFORM_SECURESFLASH_ENABLED := 1

GLOBAL_DEFINES += SECURE_SFLASH

I see many useful functions in the file spi_flash_compatible.c, but it is not clear to me if the above automatically enables these functions, or if they need to be manually employed when an SPI with hardware encryption features is connected.

Any guidance would be appreciated.

Thanks!

0 Likes
1 Solution

I took some time and added a few debug prints and found that adding "SECURE_SFLASH=1" in the make command was sufficient to enable the secure flash access.  The assignment "PLATFORM_SECURESFLASH_ENABLED := 1" is taken care of in other code.  So, the answer appears to be "yes". 

View solution in original post

0 Likes
3 Replies
PriyaM_16
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Hello,

Please refer the CYW4390X Application Note: OTP Programming and Using Secure Boot and Secure Flash​ for details of using Secure flash.

0 Likes

I did, thank you.  Seciton 6.4 says, "Build with SECURE_SFLASH=1 keys=<keys_dir> appended to the WICED build string." 

Is that sufficient to enable the secure flash read/write routines?  It isn't totally clear to me if that is the case.  If "yes", then great!

0 Likes

I took some time and added a few debug prints and found that adding "SECURE_SFLASH=1" in the make command was sufficient to enable the secure flash access.  The assignment "PLATFORM_SECURESFLASH_ENABLED := 1" is taken care of in other code.  So, the answer appears to be "yes". 

0 Likes