I.MXRT1021 Flash Operation Demo on FreeRTOS in XIP Mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I.MXRT1021 Flash Operation Demo on FreeRTOS in XIP Mode

I.MXRT1021 Flash Operation Demo on FreeRTOS in XIP Mode

       由于RT系列没有内置 Flash,大多数用户会选择外部 QSPI Flash 作为应用代码和数据的非易失存储设备,同时外部Flash的大容量在满足用户代码存储需求之外也会为用户提供了足够的灵活空间存储应用数据,但是其中涉及到的对数据读擦写以及用户的应用程序均需要在外部 Flash 执行,这为 Flash 的操作带来了麻烦。

       对于在XIP(eXecute-In-Place)模式下的应用,对Flash读擦写的操作需要在内部 RAM 里执行,而RT系列由于高主频而引入了内核 Dcache 以及 Flexspi 模块自带的 Pre-fetch 功能,对外部 Flash 的操作会有很多需要注意的地方,这些问题在带有 RTOS 的系统里则更是突显出来,而无论在 XIP 模式下的裸机还是基于 RTOS 方式对 Flash 的操作,SDK 里均没有提供例程可供参考。

       本参考方案来自很多客户的实际应用需求,所以编写了基于 FreeRTOS 下的对片外 QSPI Flash 的读擦写操作,客户可以基于此例程移植到自己的应用里面做相关的应用开发,并配套对应的指导文档提醒用户在移植过程中需要注意的几个常见的 tips。

pastedImage_1.png

Products

Product CategoryNXP Part NumberURL
MCUMIMXRT1021i.MX RT1020 Crossover MCU with Arm® Cortex®-M7 core
MCUXpresso SDK SoftwareSDK v2.6.1

Welcome | MCUXpresso SDK Builder 

 

Tools

NXP Development BoardURL
MIMXRT1020-EVK

MIMXRT1020-EVK: i.MX RT1020 Evaluation Kit

Labels (1)
Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1110283%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3EI.MXRT1021%20Flash%20Operation%20Demo%20on%20FreeRTOS%20in%20XIP%20Mode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1110283%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3Dutf-8%22%20%2F%26gt%3B%0A%3CP%3ESince%20the%20RT%20series%20does%20not%20have%20built-in%20Flash%2C%20most%20users%20will%20choose%20external%20QSPI%20Flash%20as%20a%20non-volatile%20storage%20device%20for%20application%20code%20and%20data.%20At%20the%20same%20time%2C%20the%20large%20capacity%20of%20external%20Flash%20not%20only%20meets%20the%20user's%20code%20storage%20needs%20but%20also%20provides%20users%20with%20enough%20flexible%20space%20to%20store%20application%20data.%20However%2C%20the%20data%20reading%20and%20erasing%20involved%20as%20well%20as%20the%20user's%20application%20program%20need%20to%20be%20executed%20in%20the%20external%20Flash%2C%20which%20brings%20trouble%20to%20the%20operation%20of%20Flash.%3C%2FP%3E%3CP%3EFor%20applications%20in%20XIP%20(eXecute-In-Place)%20mode%2C%20Flash%20read%2C%20erase%20and%20write%20operations%20need%20to%20be%20performed%20in%20the%20internal%20RAM.%20Due%20to%20the%20high%20main%20frequency%2C%20the%20RT%20series%20introduces%20the%20kernel%20Dcache%20and%20the%20Pre-fetch%20function%20of%20the%20Flexspi%20module.%20There%20are%20many%20things%20to%20pay%20attention%20to%20when%20operating%20the%20external%20Flash.%20These%20problems%20are%20more%20prominent%20in%20systems%20with%20RTOS.%20Regardless%20of%20the%20bare%20metal%20in%20XIP%20mode%20or%20the%20RTOS-based%20Flash%20operation%2C%20the%20SDK%20does%20not%20provide%20routines%20for%20reference.%3C%2FP%3E%3CP%3EThis%20reference%20solution%20is%20based%20on%20the%20actual%20application%20needs%20of%20many%20customers%2C%20so%20we%20wrote%20the%20read%2C%20erase%20and%20write%20operations%20of%20the%20off-chip%20QSPI%20Flash%20based%20on%20FreeRTOS.%20Customers%20can%20transplant%20this%20routine%20into%20their%20own%20applications%20for%20related%20application%20development%2C%20and%20the%20corresponding%20guidance%20documents%20are%20provided%20to%20remind%20users%20of%20several%20common%20tips%20that%20need%20to%20be%20paid%20attention%20to%20during%20the%20transplantation%20process.%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20center%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_1.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_1.png%22%20style%3D%22width%3A%20760px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F116554i47F476FC535EB6FF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_1.png%22%20alt%3D%22pastedImage_1.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%3CSPAN%20style%3D%22border%3A%200px%3B%20color%3A%20%23717171%3B%20font-weight%3A%20bold%3B%20font-size%3A%2030px%3B%22%3E%3CSTRONG%3EProducts%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%20class%3D%22%22%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%3CTABLE%20class%3D%22j-table%20jiveBorder%22%20style%3D%22border%3A%201px%20solid%20%23c6c6c6%3B%20font-weight%3A%20inherit%3B%20margin%3A%200px%200px%202px%3B%22%20width%3D%22100%25%22%3E%3CTHEAD%20style%3D%22border%3A%20inherit%20solid%20inherit%3B%20font-weight%3A%20inherit%3B%22%3E%3CTR%20style%3D%22background-color%3A%20%23efefef%3B%20font-weight%3A%20inherit%3B%20height%3A%2024px%3B%22%3E%3CTH%20class%3D%22%22%20style%3D%22font-weight%3A%20bold%3B%20padding%3A%205px%3B%20height%3A%2024px%3B%22%3E%3CSPAN%20style%3D%22border%3A%200px%3B%20font-weight%3A%20inherit%3B%22%3EProduct%20Category%3C%2FSPAN%3E%3C%2FTH%3E%3CTH%20class%3D%22%22%20style%3D%22font-weight%3A%20bold%3B%20padding%3A%205px%3B%20height%3A%2024px%3B%22%3E%3CSPAN%20style%3D%22border%3A%200px%3B%20font-weight%3A%20inherit%3B%22%3ENXP%20Part%20Number%3C%2FSPAN%3E%3C%2FTH%3E%3CTH%20class%3D%22%22%20style%3D%22font-weight%3A%20bold%3B%20padding%3A%205px%3B%20height%3A%2024px%3B%22%3E%3CSPAN%20style%3D%22border%3A%200px%3B%20font-weight%3A%20inherit%3B%22%3EURL%3C%2FSPAN%3E%3C%2FTH%3E%3C%2FTR%3E%3C%2FTHEAD%3E%3CTBODY%20style%3D%22border%3A%20inherit%20solid%20inherit%3B%20font-weight%3A%20inherit%3B%22%3E%3CTR%20style%3D%22font-weight%3A%20inherit%3B%20height%3A%2024px%3B%22%3E%3CTD%20style%3D%22padding%3A%205px%3B%20height%3A%2024px%3B%22%3EMCU%3C%2FTD%3E%3CTD%20style%3D%22padding%3A%205px%3B%20height%3A%2024px%3B%22%3EMIMXRT1021%3C%2FTD%3E%3CTD%20style%3D%22padding%3A%205px%3B%20height%3A%2024px%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fproducts%2Fprocessors-and-microcontrollers%2Farm-microcontrollers%2Fi-mx-rt-crossover-mcus%2Fi-mx-rt1020-crossover-mcu-with-arm-cortex-m7-core%3Ai.MX-RT1020%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ei.MX%20RT1020%20Crossover%20MCU%20with%20Arm%C2%AE%20Cortex%C2%AE-M7%20core%3C%2FA%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%20style%3D%22font-weight%3A%20inherit%3B%20height%3A%2024px%3B%22%3E%3CTD%20style%3D%22padding%3A%205px%3B%20height%3A%2024px%3B%22%3EMCUXpresso%20SDK%20Software%3C%2FTD%3E%3CTD%20style%3D%22padding%3A%205px%3B%20height%3A%2024px%3B%22%3ESDK%20v2.6.1%3C%2FTD%3E%3CTD%20style%3D%22padding%3A%205px%3B%20height%3A%2024px%3B%22%3E%3CP%20style%3D%22border%3A%200px%3B%20font-weight%3A%20inherit%3B%20margin%3A%200pt%200px%200pt%200in%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fmcuxpresso.nxp.com%2Fen%2Fwelcome%22%20style%3D%22color%3A%20%232989c5%3B%20text-decoration%3A%20none%3B%22%20title%3D%22https%3A%2F%2Fmcuxpresso.nxp.com%2Fen%2Fwelcome%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EWelcome%20%7C%20MCUXpresso%20SDK%20Builder%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FDIV%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20style%3D%22border%3A%200px%3B%22%3E%3CSPAN%20style%3D%22border%3A%200px%3B%20font-weight%3A%20bold%3B%20font-size%3A%2030px%3B%22%3E%3CSTRONG%3ETools%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%20class%3D%22%22%20style%3D%22border%3A%200px%3B%22%3E%3CTABLE%20class%3D%22j-table%20jiveBorder%22%20style%3D%22border%3A%201px%20solid%20%23c6c6c6%3B%20font-weight%3A%20inherit%3B%20margin%3A%200px%200px%202px%3B%22%20width%3D%22100%25%22%3E%3CTHEAD%20style%3D%22border%3A%20inherit%20solid%20inherit%3B%20font-weight%3A%20inherit%3B%22%3E%3CTR%20style%3D%22background-color%3A%20%23efefef%3B%20border%3A%20inherit%20solid%20inherit%3B%20font-weight%3A%20inherit%3B%22%3E%3CTH%20class%3D%22%22%20style%3D%22border%3A%20inherit%20solid%20inherit%3B%20font-weight%3A%20bold%3B%20padding%3A%205px%3B%22%3E%3CSPAN%20style%3D%22border%3A%200px%3B%20font-weight%3A%20inherit%3B%22%3ENXP%20Development%20Board%3C%2FSPAN%3E%3C%2FTH%3E%3CTH%20class%3D%22%22%20style%3D%22border%3A%20inherit%20solid%20inherit%3B%20font-weight%3A%20bold%3B%20padding%3A%205px%3B%22%3E%3CSPAN%20style%3D%22border%3A%200px%3B%20font-weight%3A%20inherit%3B%22%3EURL%3C%2FSPAN%3E%3C%2FTH%3E%3C%2FTR%3E%3C%2FTHEAD%3E%3CTBODY%20style%3D%22border%3A%20inherit%20solid%20inherit%3B%20font-weight%3A%20inherit%3B%22%3E%3CTR%20style%3D%22border%3A%20inherit%20solid%20inherit%3B%20font-weight%3A%20inherit%3B%22%3E%3CTD%20style%3D%22border%3A%20inherit%20solid%20inherit%3B%20padding%3A%205px%3B%22%3EMIMXRT1020-EVK%3C%2FTD%3E%3CTD%20style%3D%22border%3A%20inherit%20solid%20inherit%3B%20padding%3A%205px%3B%22%3E%3CP%20style%3D%22border%3A%200px%3B%20font-weight%3A%20inherit%3B%20margin%3A%200pt%200px%200pt%200in%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdevelopment-boards%2Fi-mx-evaluation-and-development-boards%2Fi-mx-rt1020-evaluation-kit%3AMIMXRT1020-EVK%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EMIMXRT1020-EVK%3A%20i.MX%20RT1020%20Evaluation%20Kit%3C%2FA%3E%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1110283%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EIndustrial%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎07-21-2020 11:28 PM
Updated by: