![]() |
MKMxxZxxACxx5 Bare Metal Software Drivers
R4.1.6
Reference Manual
|
This example shows use of the General-Purpose Input/Output (GPIO) port protection mechanism. The GPIOA is configured to allow RW privileged and user secure/non-secure accesses. On the contrary GPIOB is configured for privileged RW accesses only (user secure/non-secure RW accesses are not allowed). Consequently, GPIO_Tgl(FGPIOB,PIN0)
and GPIO_Tgl(GPIOB,PIN0)
macros don't execute in a user mode to insufficient access level. The IOPORT accesses, demonstrated by GPIO_Tgl(FGPIOB,PIN0)
macro, that are not allowed are treated as a RAZ/WI (Read As Zero/Write Ignored). On the contrary accesses via Peripheral Bridge, demonstrated by GPIO_Tgl(GPIOB,PIN0)
macro, which are not allowed, terminate by the Hard Fault.
IAR EWARM 7.40.7 | CodeWarrior 10.6 | KEIL uVision 5.15 | CrossWorks 3.6 | ATOLLIC TrueStudio 5.3.0 | Kinetis Design Studio 3.0.0 |
---|---|---|---|---|---|
♦ | ♦ | ♦ | ♦ | ♦ | ♦ |