у AT32F407/413 есть аппаратная поддержка SPI флешки (SPIM) с общим
адресным пространством. Но как все это работает пока не разбирался,
руки не дошли "
External memory
External Flash memory controls the external SPI Flash through SPIM transmission interface. It
supports ciphertext protection. User can decide whether or not to encrypte the data by setting the
EXT_FLASH_KEYx bit of the user system data area, and can control the range to be encrypted
with the FLASH_DA register.
AHB clock (HCLK), used as a reference clock of SPIM, provides HCLK/2 clock for external SPIM
via SPIM interface.
SPIM=External SPI Flash memory expansion (program execution/data store/program and data
encrypted)
Note: SPIM has to be accessed by word or half-word."