%3CLINGO-SUB%20id%3D%22lingo-sub-1992869%22%20slang%3D%22en-US%22%3ECombining%20Azure%20Sphere%20IoT%20security%20with%20Azure%20RTOS%20real-time%20capabilities%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1992869%22%20slang%3D%22en-US%22%3E%3CP%3ELearn%20how%20you%20can%20combine%20the%20best%20of%20Azure%20Sphere%20IoT%20security%20with%20the%20power%20of%20Azure%20RTOS%20to%20deliver%20new%20IoT%20solution%20categories.%20Covered%20in%20this%20article%20is%20a%20brief%20introduction%20to%20Azure%20RTOS%2C%20Azure%20Sphere%2C%20and%20the%20MediaTek%20MT3620%20MCU%20architecture.%20You%20will%20also%20learn%20why%20you%20might%20want%20to%20run%20real-time%20applications%20on%20an%20Azure%20Sphere%2C%20how%20applications%20communicate%20across%20cores%20and%20how%20to%20get%20started.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAzure%20RTOS%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EAzure%20RTOS%20is%20a%20%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FReal-time_operating_system%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EReal-Time%20Operating%20System%3C%2FA%3E%20available%20from%20Microsoft%20that%20runs%20on%20most%20microcontrollers.%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fservices%2Frtos%3FWT.mc_id%3Diot-10976-dglover%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20RTOS%26nbsp%3B%3C%2FA%3E%20includes%20a%20small%20powerful%20Real%20Time%20operating%20system%20called%20ThreadX%2C%20a%20GUI%20designer%20plus%20GUI%20library%2C%20and%20more.%26nbsp%3B%20%3CSPAN%20class%3D%22TextRun%20SCXW73315365%20BCX9%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW73315365%20BCX9%22%3EAzure%20RTOS%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW73315365%20BCX9%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW73315365%20BCX9%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW73315365%20BCX9%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SpellingErrorV2%20SCXW73315365%20BCX9%22%3EThreadX%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW73315365%20BCX9%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW73315365%20BCX9%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Emakes%20it%20easier%20to%20build%20reliable%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW73315365%20BCX9%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW73315365%20BCX9%22%3Eembedded%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW73315365%20BCX9%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW73315365%20BCX9%22%3Esolutions%20with%20a%20rich%20set%20of%20services%20including%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW73315365%20BCX9%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW73315365%20BCX9%22%3Ereal-time%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW73315365%20BCX9%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW73315365%20BCX9%22%3E%2C%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW73315365%20BCX9%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW73315365%20BCX9%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Emultithreading%2C%20inter-thread%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW73315365%20BCX9%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW73315365%20BCX9%22%3Ecommunication%2C%20synchronization%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW73315365%20BCX9%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW73315365%20BCX9%22%3E%2C%20timers%2C%20and%20memory%20management.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAzure%20RTOS%20is%20free%20to%20use%20on%20an%20Azure%20Sphere%20MT3620%20MCU%20and%20is%20covered%20by%20the%20%E2%80%9CDistribution%20and%20Production%20Use%E2%80%9D%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fazure-rtos%2Fthreadx%2Fblob%2Fmaster%2FLICENSED-HARDWARE.txt%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elicense%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAzure%20Sphere%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20traditional%20approach%20to%20IoT%20microcontroller%20development%20is%20that%20you%20are%20responsible%20for%20integrating%20and%20maintaining%20all%20the%20bits%20of%20a%20solution.%20This%20includes%20the%20communications%20stack%2C%20security%2C%20authentication%2C%20certificates%2C%20identity%2C%20encryption%20libraries%2C%20update%20processes%2C%20your%20solution%20and%20more.%20Not%20only%20are%20you%20a%20solution%20domain%20expert%2C%20but%20you%20are%20now%20responsible%20for%20tracking%20new%20and%20emerging%20security%20threats%2C%20mitigating%2C%20and%20updating%20to%20protect%20IoT%20devices.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAzure%20Sphere%20is%20a%20unique%20highly%20secure%20IoT%20platform.%20You%20focus%20on%20your%20solution%2C%20Azure%20Sphere%20deals%20with%20security%2C%20identity%2C%20certificates%2C%20reporting%2C%20tracking%20emerging%20attack%20vectors%2C%20mitigating%2C%20updating%20the%20platform%2C%20and%20application%20distribution%20to%20protect%20your%20solutions%2C%20customers%2C%20and%20reputations.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAzure%20Sphere%20consists%20of%20the%20following%20components%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3EAzure%20Sphere%E2%80%93certified%20chips%3C%2FSTRONG%3E%26nbsp%3Bfrom%20hardware%20partners%20include%20built-in%20Microsoft%20security%20technology%20to%20provide%20connectivity%20and%20a%20dependable%20hardware%20root%20of%20trust.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EAzure%20Sphere%20OS%3C%2FSTRONG%3E%26nbsp%3Badds%20layers%20of%20protection%20and%20ongoing%20security%20updates%20to%20create%20a%20trustworthy%20platform%20for%20new%20IoT%20experiences.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EAzure%20Sphere%20Security%20Service%3C%2FSTRONG%3E%26nbsp%3Bbrokers%20trust%20for%20device-to-cloud%20communication%2C%20detects%20threats%2C%20and%20renews%20device%20security.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ETogether%20these%20components%20implement%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fresearch%2Fpublication%2Fseven-properties-highly-secure-devices%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EThe%20Seven%20Properties%20of%20Highly%20Secure%20Devices%26nbsp%3B%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22glovebox_0-1608114131025.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F241004i64D3B2D9A4EADB73%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22glovebox_0-1608114131025.png%22%20alt%3D%22glovebox_0-1608114131025.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAzure%20Sphere%20MediaTek%20MT3620%20MCU%20architecture%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20first%20Azure%20Sphere%20certified%20MCU%20is%20the%20MediaTek%20MT3620%20microcontroller%20unit%20(MCU).%20This%20MCU%20which%20has%20three%20developer-accessible%20cores%2C%20a%20Cortex-A7%20that%20runs%20a%20hardened%20Linux%20kernel%2C%20and%20two%20Cortex-M4%20cores.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThe%20Cortex-A7%20core%20runs%20less%20timing-sensitive%20tasks%20such%20as%20setting%20up%20network%20connections%2C%20negotiating%20security%2C%20refreshing%20certificates%2C%20updating%20the%20device%20OS%20and%20applications.%20You%20can%20run%20a%20custom%20application%20on%20this%20core%20and%20send%20and%20receive%20messages%20to%20predefined%20network%20endpoints%20including%20cloud%20gateways%20such%20as%20Azure%20IoT%20Hub.%3C%2FLI%3E%0A%3CLI%3EOn%20the%20Cortex%20M4%20cores%20you%20can%20run%20bare-metal%20code%2C%20or%20applications%20running%20on%20a%20real-time%20operating%20system%20such%20as%20Azure%20RTOS%20or%20FreeRTOS.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22glovebox_1-1608114150541.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F241005i9B6928A2B10B6EB9%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22glovebox_1-1608114150541.png%22%20alt%3D%22glovebox_1-1608114150541.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1179032109%22%20id%3D%22toc-hId--1179032109%22%3EWhat%20is%20an%20RTOS%20(Real-Time%20Operating%20System)%3C%2FH2%3E%0A%3CP%3EA%20system%20is%20said%20to%20be%20real-time%20if%20the%20total%20correctness%20of%20an%20operation%20depends%20not%20only%20upon%20its%20logical%20correctness%2C%20but%20also%20upon%20the%20time%20in%20which%20it%20is%20performed%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FReal-time_computing%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ELink%20to%20Wikipedia%20Article.%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20Real-Time%20Operating%20System%20is%20system%20software%20that%20provides%20services%20and%20manages%20processor%20resources%20for%20applications.%20These%20resources%20include%20processor%20cycles%2C%20memory%2C%20peripherals%2C%20and%20interrupts.%20The%20main%20purpose%20of%20a%20real-time%20Operating%20System%20is%20to%20allocate%20processing%20time%20among%20various%20duties%20the%20embedded%20software%20must%20perform.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1308480724%22%20id%3D%22toc-hId-1308480724%22%3EWhy%20run%20real-time%20Azure%20RTOS%20applications%20on%20Azure%20Sphere%3C%2FH2%3E%0A%3CP%3EThe%20main%20reasons%20to%20run%20real-time%20applications%20on%20an%20Azure%20Sphere%20include%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EYour%20application%20requires%20precise%20or%20deterministic%20timing%20that%20cannot%20be%20guaranteed%20on%20the%20Cortex-A7%20Linux%20kernel%20core%20where%20it%20would%20have%20to%20compete%20for%20resources%20with%20other%20services.%3C%2FLI%3E%0A%3CLI%3EYou%20are%20migrating%20existing%20Cortex%20M4%20code%20to%20an%20Azure%20Sphere.%3C%2FLI%3E%0A%3CLI%3ERunning%20your%20application%20across%20multiple%20cores%20to%20take%20advantage%20of%20all%20the%20memory%20and%20processing%20resources%20on%20the%20Azure%20Sphere.%3C%2FLI%3E%0A%3CLI%3EDedicating%20a%20core%20to%20running%20compute%20intensive%20applications%20like%20machine%20learning%20models%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EIntercore%20communications%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EFor%20security%20reasons%2C%20applications%20running%20on%20the%20Cortex%20M4%20cores%20cannot%20directly%20access%20network%20endpoints.%20Applications%20can%20communicate%20with%20applications%20running%20on%20other%20cores%20through%20a%20secure%20mailbox%20mechanism.%20As%20an%20added%20layer%20of%20security%2C%20applications%20can%20only%20communicate%20across%20cores%20with%20applications%20they%20have%20been%20partnered%20with%20at%20development%20time.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ESolution%20architecture%20example%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThis%20environment%20monitoring%20solution%20shows%20how%20you%20can%20integrate%20a%20real-time%20Azure%20RTOS%20application%20with%20Azure%20Sphere%20and%20IoT%20Central.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20solution%20architecture%20is%20as%20follows%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EThe%20Azure%20RTOS%20real-time%20environment%20sensor%20thread%20runs%20every%202%20seconds.%20The%20thread%20stores%20in%20memory%20the%20latest%20environment%20temperature%2C%20humidity%2C%20and%20pressure%20data.%3C%2FLI%3E%0A%3CLI%3EThe%20high-level%20Azure%20Sphere%20applications%20requests%20environment%20data%20from%20the%20real-time%20Azure%20RTOS%20application.%3C%2FLI%3E%0A%3CLI%3EThe%20Azure%20RTOS%20real-time%20%E2%80%98environment%20service%20thread%E2%80%99%20responds%20with%20the%20latest%20environment%20data.%3C%2FLI%3E%0A%3CLI%3EThe%20high-level%20application%20serializes%20the%20environment%20data%20as%20JSON%20and%20sends%20the%20telemetry%20message%20to%20IoT%20Central.%3C%2FLI%3E%0A%3CLI%3EThe%20IoT%20Central%20user%20can%20also%20set%20the%20desired%20temperature%20for%20the%20room%20by%20setting%20a%20property%20in%20IoT%20Central.%3C%2FLI%3E%0A%3CLI%3EThe%20Azure%20Sphere%20then%20sets%20the%20HVAC%20operating%20mode%20to%20meet%20the%20desired%20temperature.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22glovebox_0-1608166415304.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F241221iF85177E5BC569A8C%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22glovebox_0-1608166415304.png%22%20alt%3D%22glovebox_0-1608166415304.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EDeveloper%20Experience%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EYou%20can%20develop%20Azure%20Sphere%20and%20Azure%20RTOS%20applications%20on%20Linux%20and%20Windows.%20On%20Windows%2C%20you%20can%20develop%20high-level%20and%20real-time%20applications%20with%20%3CA%20href%3D%22https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%3FWT.mc_id%3Diot-10976-dglover%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EVisual%20Studio%3C%2FA%3E%20(free%20Community%20Edition%20or%20better)%2C%20%3CA%20href%3D%22https%3A%2F%2Fcode.visualstudio.com%3FWT.mc_id%3Diot-10976-dglover%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EVisual%20Studio%20Code%3C%2FA%3E%2C%20or%20integrate%20with%20your%20existing%20toolchains.%20On%20Linux%20you%20can%20develop%20high-level%20and%20real-time%20applications%20with%20Visual%20Studio%20Code%20or%20integrate%20with%20your%20existing%20toolchains.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ENext%20Steps%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThere%20are%20two%20Microsoft%20Learn%20modules%20which%20include%20hands-on%20labs%20you%20can%20download%20to%20start%20your%20Azure%20Sphere%20and%20Azure%20RTOS%20journey.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fmodules%2Fdevelop-secure-iot-solutions-azure-sphere-iot-central%3FWT.mc_id%3Diot-10976-dglover%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EDevelop%20secure%20IoT%20solutions%20for%20Azure%20Sphere%2C%20Azure%20RTOS%20and%20Azure%20IoT%20Central%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fmodules%2Fdevelop-secure-iot-solutions-azure-sphere-iot-hub%3FWT.mc_id%3Diot-11691-dglover%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EDevelop%20secure%20IoT%20Solutions%20for%20Azure%20Sphere%2C%20Azure%20RTOS%20and%20IoT%20Hub%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3ESkip%20to%20unit%2016%20to%20learn%20more%20about%20real-time%20Azure%20RTOS%20running%20on%20an%20Azure%20Sphere.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1992869%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22blog.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F241218i4447CC6F251F364B%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22blog.png%22%20alt%3D%22blog.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22lia-teaserTinyMceEditorglovebox_3%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3ECombine%20the%20best%20of%20Azure%20Sphere%20IoT%20security%20with%20the%20real-time%20power%20of%20Azure%20RTOS.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1992869%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20IoT%20Central%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20RTOS%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Sphere%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Learn how you can combine the best of Azure Sphere IoT security with the power of Azure RTOS to deliver new IoT solution categories. Covered in this article is a brief introduction to Azure RTOS, Azure Sphere, and the MediaTek MT3620 MCU architecture. You will also learn why you might want to run real-time applications on an Azure Sphere, how applications communicate across cores and how to get started.

 

Azure RTOS

Azure RTOS is a Real-Time Operating System available from Microsoft that runs on most microcontrollers. Azure RTOS  includes a small powerful Real Time operating system called ThreadX, a GUI designer plus GUI library, and more.  Azure RTOS ThreadX makes it easier to build reliable embedded solutions with a rich set of services including real-time, multithreading, inter-thread communication, synchronization, timers, and memory management.

 

Azure RTOS is free to use on an Azure Sphere MT3620 MCU and is covered by the “Distribution and Production Use” license.

 

Azure Sphere

The traditional approach to IoT microcontroller development is that you are responsible for integrating and maintaining all the bits of a solution. This includes the communications stack, security, authentication, certificates, identity, encryption libraries, update processes, your solution and more. Not only are you a solution domain expert, but you are now responsible for tracking new and emerging security threats, mitigating, and updating to protect IoT devices.

 

Azure Sphere is a unique highly secure IoT platform. You focus on your solution, Azure Sphere deals with security, identity, certificates, reporting, tracking emerging attack vectors, mitigating, updating the platform, and application distribution to protect your solutions, customers, and reputations.

 

Azure Sphere consists of the following components:

 

  • Azure Sphere–certified chips from hardware partners include built-in Microsoft security technology to provide connectivity and a dependable hardware root of trust.
  • Azure Sphere OS adds layers of protection and ongoing security updates to create a trustworthy platform for new IoT experiences.
  • Azure Sphere Security Service brokers trust for device-to-cloud communication, detects threats, and renews device security.

Together these components implement The Seven Properties of Highly Secure Devices .

 

glovebox_0-1608114131025.png

 

 

Azure Sphere MediaTek MT3620 MCU architecture

The first Azure Sphere certified MCU is the MediaTek MT3620 microcontroller unit (MCU). This MCU which has three developer-accessible cores, a Cortex-A7 that runs a hardened Linux kernel, and two Cortex-M4 cores.

 

  • The Cortex-A7 core runs less timing-sensitive tasks such as setting up network connections, negotiating security, refreshing certificates, updating the device OS and applications. You can run a custom application on this core and send and receive messages to predefined network endpoints including cloud gateways such as Azure IoT Hub.
  • On the Cortex M4 cores you can run bare-metal code, or applications running on a real-time operating system such as Azure RTOS or FreeRTOS.

glovebox_1-1608114150541.png

 

 

What is an RTOS (Real-Time Operating System)

A system is said to be real-time if the total correctness of an operation depends not only upon its logical correctness, but also upon the time in which it is performed Link to Wikipedia Article.

 

A Real-Time Operating System is system software that provides services and manages processor resources for applications. These resources include processor cycles, memory, peripherals, and interrupts. The main purpose of a real-time Operating System is to allocate processing time among various duties the embedded software must perform.

 

Why run real-time Azure RTOS applications on Azure Sphere

The main reasons to run real-time applications on an Azure Sphere include:

 

  1. Your application requires precise or deterministic timing that cannot be guaranteed on the Cortex-A7 Linux kernel core where it would have to compete for resources with other services.
  2. You are migrating existing Cortex M4 code to an Azure Sphere.
  3. Running your application across multiple cores to take advantage of all the memory and processing resources on the Azure Sphere.
  4. Dedicating a core to running compute intensive applications like machine learning models

 

Intercore communications

For security reasons, applications running on the Cortex M4 cores cannot directly access network endpoints. Applications can communicate with applications running on other cores through a secure mailbox mechanism. As an added layer of security, applications can only communicate across cores with applications they have been partnered with at development time.

 

Solution architecture example

This environment monitoring solution shows how you can integrate a real-time Azure RTOS application with Azure Sphere and IoT Central.

 

The solution architecture is as follows:

 

  1. The Azure RTOS real-time environment sensor thread runs every 2 seconds. The thread stores in memory the latest environment temperature, humidity, and pressure data.
  2. The high-level Azure Sphere applications requests environment data from the real-time Azure RTOS application.
  3. The Azure RTOS real-time ‘environment service thread’ responds with the latest environment data.
  4. The high-level application serializes the environment data as JSON and sends the telemetry message to IoT Central.
  5. The IoT Central user can also set the desired temperature for the room by setting a property in IoT Central.
  6. The Azure Sphere then sets the HVAC operating mode to meet the desired temperature.

 

glovebox_0-1608166415304.png

 

 

Developer Experience

You can develop Azure Sphere and Azure RTOS applications on Linux and Windows. On Windows, you can develop high-level and real-time applications with Visual Studio (free Community Edition or better), Visual Studio Code, or integrate with your existing toolchains. On Linux you can develop high-level and real-time applications with Visual Studio Code or integrate with your existing toolchains.

 

Next Steps

There are two Microsoft Learn modules which include hands-on labs you can download to start your Azure Sphere and Azure RTOS journey.

 

  1. Develop secure IoT solutions for Azure Sphere, Azure RTOS and Azure IoT Central
  2. Develop secure IoT Solutions for Azure Sphere, Azure RTOS and IoT Hub

Skip to unit 16 to learn more about real-time Azure RTOS running on an Azure Sphere.