Skip to main content

ra6m2_pac/
spmon.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.2, with svd2pac 0.6.1 on Sun, 15 Mar 2026 07:11:44 +0000
19
20#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"CPU Stack Pointer Monitor"]
28unsafe impl ::core::marker::Send for super::Spmon {}
29unsafe impl ::core::marker::Sync for super::Spmon {}
30impl super::Spmon {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "Stack Pointer Monitor Operation After Detection Register"]
38    #[inline(always)]
39    pub const fn mspmpuoad(
40        &self,
41    ) -> &'static crate::common::Reg<self::Mspmpuoad_SPEC, crate::common::RW> {
42        unsafe {
43            crate::common::Reg::<self::Mspmpuoad_SPEC, crate::common::RW>::from_ptr(
44                self._svd2pac_as_ptr().add(0usize),
45            )
46        }
47    }
48
49    #[doc = "Stack Pointer Monitor Access Control Register"]
50    #[inline(always)]
51    pub const fn mspmpuctl(
52        &self,
53    ) -> &'static crate::common::Reg<self::Mspmpuctl_SPEC, crate::common::RW> {
54        unsafe {
55            crate::common::Reg::<self::Mspmpuctl_SPEC, crate::common::RW>::from_ptr(
56                self._svd2pac_as_ptr().add(4usize),
57            )
58        }
59    }
60
61    #[doc = "Stack Pointer Monitor Protection Register"]
62    #[inline(always)]
63    pub const fn mspmpupt(
64        &self,
65    ) -> &'static crate::common::Reg<self::Mspmpupt_SPEC, crate::common::RW> {
66        unsafe {
67            crate::common::Reg::<self::Mspmpupt_SPEC, crate::common::RW>::from_ptr(
68                self._svd2pac_as_ptr().add(6usize),
69            )
70        }
71    }
72
73    #[doc = "Main Stack Pointer Monitor Start Address Register"]
74    #[inline(always)]
75    pub const fn mspmpusa(
76        &self,
77    ) -> &'static crate::common::Reg<self::Mspmpusa_SPEC, crate::common::RW> {
78        unsafe {
79            crate::common::Reg::<self::Mspmpusa_SPEC, crate::common::RW>::from_ptr(
80                self._svd2pac_as_ptr().add(8usize),
81            )
82        }
83    }
84
85    #[doc = "Main Stack Pointer Monitor End Address Register"]
86    #[inline(always)]
87    pub const fn mspmpuea(
88        &self,
89    ) -> &'static crate::common::Reg<self::Mspmpuea_SPEC, crate::common::RW> {
90        unsafe {
91            crate::common::Reg::<self::Mspmpuea_SPEC, crate::common::RW>::from_ptr(
92                self._svd2pac_as_ptr().add(12usize),
93            )
94        }
95    }
96
97    #[doc = "Stack Pointer Monitor Operation After Detection Register"]
98    #[inline(always)]
99    pub const fn pspmpuoad(
100        &self,
101    ) -> &'static crate::common::Reg<self::Pspmpuoad_SPEC, crate::common::RW> {
102        unsafe {
103            crate::common::Reg::<self::Pspmpuoad_SPEC, crate::common::RW>::from_ptr(
104                self._svd2pac_as_ptr().add(16usize),
105            )
106        }
107    }
108
109    #[doc = "Stack Pointer Monitor Access Control Register"]
110    #[inline(always)]
111    pub const fn pspmpuctl(
112        &self,
113    ) -> &'static crate::common::Reg<self::Pspmpuctl_SPEC, crate::common::RW> {
114        unsafe {
115            crate::common::Reg::<self::Pspmpuctl_SPEC, crate::common::RW>::from_ptr(
116                self._svd2pac_as_ptr().add(20usize),
117            )
118        }
119    }
120
121    #[doc = "Stack Pointer Monitor Protection Register"]
122    #[inline(always)]
123    pub const fn pspmpupt(
124        &self,
125    ) -> &'static crate::common::Reg<self::Pspmpupt_SPEC, crate::common::RW> {
126        unsafe {
127            crate::common::Reg::<self::Pspmpupt_SPEC, crate::common::RW>::from_ptr(
128                self._svd2pac_as_ptr().add(22usize),
129            )
130        }
131    }
132
133    #[doc = "Process Stack Pointer Monitor Start Address Register"]
134    #[inline(always)]
135    pub const fn pspmpusa(
136        &self,
137    ) -> &'static crate::common::Reg<self::Pspmpusa_SPEC, crate::common::RW> {
138        unsafe {
139            crate::common::Reg::<self::Pspmpusa_SPEC, crate::common::RW>::from_ptr(
140                self._svd2pac_as_ptr().add(24usize),
141            )
142        }
143    }
144
145    #[doc = "Process Stack Pointer Monitor End Address Register"]
146    #[inline(always)]
147    pub const fn pspmpuea(
148        &self,
149    ) -> &'static crate::common::Reg<self::Pspmpuea_SPEC, crate::common::RW> {
150        unsafe {
151            crate::common::Reg::<self::Pspmpuea_SPEC, crate::common::RW>::from_ptr(
152                self._svd2pac_as_ptr().add(28usize),
153            )
154        }
155    }
156}
157#[doc(hidden)]
158#[derive(Copy, Clone, Eq, PartialEq)]
159pub struct Mspmpuoad_SPEC;
160impl crate::sealed::RegSpec for Mspmpuoad_SPEC {
161    type DataType = u16;
162}
163
164#[doc = "Stack Pointer Monitor Operation After Detection Register"]
165pub type Mspmpuoad = crate::RegValueT<Mspmpuoad_SPEC>;
166
167impl Mspmpuoad {
168    #[doc = "Write Keyword The data written to these bits are not stored."]
169    #[inline(always)]
170    pub fn key(
171        self,
172    ) -> crate::common::RegisterField<
173        8,
174        0xff,
175        1,
176        0,
177        mspmpuoad::Key,
178        mspmpuoad::Key,
179        Mspmpuoad_SPEC,
180        crate::common::W,
181    > {
182        crate::common::RegisterField::<
183            8,
184            0xff,
185            1,
186            0,
187            mspmpuoad::Key,
188            mspmpuoad::Key,
189            Mspmpuoad_SPEC,
190            crate::common::W,
191        >::from_register(self, 0)
192    }
193
194    #[doc = "Operation after detection"]
195    #[inline(always)]
196    pub fn oad(
197        self,
198    ) -> crate::common::RegisterField<
199        0,
200        0x1,
201        1,
202        0,
203        mspmpuoad::Oad,
204        mspmpuoad::Oad,
205        Mspmpuoad_SPEC,
206        crate::common::RW,
207    > {
208        crate::common::RegisterField::<
209            0,
210            0x1,
211            1,
212            0,
213            mspmpuoad::Oad,
214            mspmpuoad::Oad,
215            Mspmpuoad_SPEC,
216            crate::common::RW,
217        >::from_register(self, 0)
218    }
219}
220impl ::core::default::Default for Mspmpuoad {
221    #[inline(always)]
222    fn default() -> Mspmpuoad {
223        <crate::RegValueT<Mspmpuoad_SPEC> as RegisterValue<_>>::new(0)
224    }
225}
226pub mod mspmpuoad {
227
228    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
229    pub struct Key_SPEC;
230    pub type Key = crate::EnumBitfieldStruct<u8, Key_SPEC>;
231    impl Key {
232        #[doc = "Writing to the OAD bit is valid, when the KEY bits are written 0xA5."]
233        pub const _0_X_A_5: Self = Self::new(165);
234    }
235    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
236    pub struct Oad_SPEC;
237    pub type Oad = crate::EnumBitfieldStruct<u8, Oad_SPEC>;
238    impl Oad {
239        #[doc = "Internal reset."]
240        pub const _1: Self = Self::new(1);
241
242        #[doc = "Non-maskable interrupt."]
243        pub const _0: Self = Self::new(0);
244    }
245}
246#[doc(hidden)]
247#[derive(Copy, Clone, Eq, PartialEq)]
248pub struct Mspmpuctl_SPEC;
249impl crate::sealed::RegSpec for Mspmpuctl_SPEC {
250    type DataType = u16;
251}
252
253#[doc = "Stack Pointer Monitor Access Control Register"]
254pub type Mspmpuctl = crate::RegValueT<Mspmpuctl_SPEC>;
255
256impl Mspmpuctl {
257    #[doc = "SP_main monitor error flag"]
258    #[inline(always)]
259    pub fn error(
260        self,
261    ) -> crate::common::RegisterField<
262        8,
263        0x1,
264        1,
265        0,
266        mspmpuctl::Error,
267        mspmpuctl::Error,
268        Mspmpuctl_SPEC,
269        crate::common::R,
270    > {
271        crate::common::RegisterField::<
272            8,
273            0x1,
274            1,
275            0,
276            mspmpuctl::Error,
277            mspmpuctl::Error,
278            Mspmpuctl_SPEC,
279            crate::common::R,
280        >::from_register(self, 0)
281    }
282
283    #[doc = "SP_main monitor enable"]
284    #[inline(always)]
285    pub fn enable(
286        self,
287    ) -> crate::common::RegisterField<
288        0,
289        0x1,
290        1,
291        0,
292        mspmpuctl::Enable,
293        mspmpuctl::Enable,
294        Mspmpuctl_SPEC,
295        crate::common::RW,
296    > {
297        crate::common::RegisterField::<
298            0,
299            0x1,
300            1,
301            0,
302            mspmpuctl::Enable,
303            mspmpuctl::Enable,
304            Mspmpuctl_SPEC,
305            crate::common::RW,
306        >::from_register(self, 0)
307    }
308}
309impl ::core::default::Default for Mspmpuctl {
310    #[inline(always)]
311    fn default() -> Mspmpuctl {
312        <crate::RegValueT<Mspmpuctl_SPEC> as RegisterValue<_>>::new(0)
313    }
314}
315pub mod mspmpuctl {
316
317    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
318    pub struct Error_SPEC;
319    pub type Error = crate::EnumBitfieldStruct<u8, Error_SPEC>;
320    impl Error {
321        #[doc = "SP_main has not overflowed or underflowed."]
322        pub const _0: Self = Self::new(0);
323
324        #[doc = "SP_main has overflowed or underflowed."]
325        pub const _1: Self = Self::new(1);
326    }
327    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
328    pub struct Enable_SPEC;
329    pub type Enable = crate::EnumBitfieldStruct<u8, Enable_SPEC>;
330    impl Enable {
331        #[doc = "SP_main monitor is disabled."]
332        pub const _0: Self = Self::new(0);
333
334        #[doc = "SP_main monitor is enabled."]
335        pub const _1: Self = Self::new(1);
336    }
337}
338#[doc(hidden)]
339#[derive(Copy, Clone, Eq, PartialEq)]
340pub struct Mspmpupt_SPEC;
341impl crate::sealed::RegSpec for Mspmpupt_SPEC {
342    type DataType = u16;
343}
344
345#[doc = "Stack Pointer Monitor Protection Register"]
346pub type Mspmpupt = crate::RegValueT<Mspmpupt_SPEC>;
347
348impl Mspmpupt {
349    #[doc = "Write Keyword The data written to these bits are not stored."]
350    #[inline(always)]
351    pub fn key(
352        self,
353    ) -> crate::common::RegisterField<
354        8,
355        0xff,
356        1,
357        0,
358        mspmpupt::Key,
359        mspmpupt::Key,
360        Mspmpupt_SPEC,
361        crate::common::W,
362    > {
363        crate::common::RegisterField::<
364            8,
365            0xff,
366            1,
367            0,
368            mspmpupt::Key,
369            mspmpupt::Key,
370            Mspmpupt_SPEC,
371            crate::common::W,
372        >::from_register(self, 0)
373    }
374
375    #[doc = "Protection of register (MSPMPUAC, MSPMPUSA and MSPMPUSE)"]
376    #[inline(always)]
377    pub fn protect(
378        self,
379    ) -> crate::common::RegisterField<
380        0,
381        0x1,
382        1,
383        0,
384        mspmpupt::Protect,
385        mspmpupt::Protect,
386        Mspmpupt_SPEC,
387        crate::common::RW,
388    > {
389        crate::common::RegisterField::<
390            0,
391            0x1,
392            1,
393            0,
394            mspmpupt::Protect,
395            mspmpupt::Protect,
396            Mspmpupt_SPEC,
397            crate::common::RW,
398        >::from_register(self, 0)
399    }
400}
401impl ::core::default::Default for Mspmpupt {
402    #[inline(always)]
403    fn default() -> Mspmpupt {
404        <crate::RegValueT<Mspmpupt_SPEC> as RegisterValue<_>>::new(0)
405    }
406}
407pub mod mspmpupt {
408
409    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
410    pub struct Key_SPEC;
411    pub type Key = crate::EnumBitfieldStruct<u8, Key_SPEC>;
412    impl Key {
413        #[doc = "Writing to the PROTECT bit is valid, when the KEY bits are written 0xA5."]
414        pub const _0_X_A_5: Self = Self::new(165);
415    }
416    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
417    pub struct Protect_SPEC;
418    pub type Protect = crate::EnumBitfieldStruct<u8, Protect_SPEC>;
419    impl Protect {
420        #[doc = "Stack Pointer Monitor register writing is possible."]
421        pub const _0: Self = Self::new(0);
422
423        #[doc = "Stack Pointer Monitor register writing is protected."]
424        pub const _1: Self = Self::new(1);
425    }
426}
427#[doc(hidden)]
428#[derive(Copy, Clone, Eq, PartialEq)]
429pub struct Mspmpusa_SPEC;
430impl crate::sealed::RegSpec for Mspmpusa_SPEC {
431    type DataType = u32;
432}
433
434#[doc = "Main Stack Pointer Monitor Start Address Register"]
435pub type Mspmpusa = crate::RegValueT<Mspmpusa_SPEC>;
436
437impl Mspmpusa {
438    #[doc = "Region start address register Address where the region starts, for use in region determination.NOTE: Range: 0x1FF00000-0x200FFFFC         The low-order 2 bits are fixed to 0."]
439    #[inline(always)]
440    pub fn mspmpusa(
441        self,
442    ) -> crate::common::RegisterField<2, 0x3fffffff, 1, 0, u32, u32, Mspmpusa_SPEC, crate::common::RW>
443    {
444        crate::common::RegisterField::<
445            2,
446            0x3fffffff,
447            1,
448            0,
449            u32,
450            u32,
451            Mspmpusa_SPEC,
452            crate::common::RW,
453        >::from_register(self, 0)
454    }
455}
456impl ::core::default::Default for Mspmpusa {
457    #[inline(always)]
458    fn default() -> Mspmpusa {
459        <crate::RegValueT<Mspmpusa_SPEC> as RegisterValue<_>>::new(0)
460    }
461}
462
463#[doc(hidden)]
464#[derive(Copy, Clone, Eq, PartialEq)]
465pub struct Mspmpuea_SPEC;
466impl crate::sealed::RegSpec for Mspmpuea_SPEC {
467    type DataType = u32;
468}
469
470#[doc = "Main Stack Pointer Monitor End Address Register"]
471pub type Mspmpuea = crate::RegValueT<Mspmpuea_SPEC>;
472
473impl Mspmpuea {
474    #[doc = "Region end address register Address where the region starts, for use in region determination.NOTE: Range: 0x1FF00003-0x200FFFFF         The low-order 2 bits are fixed to 1."]
475    #[inline(always)]
476    pub fn mspmpuea(
477        self,
478    ) -> crate::common::RegisterField<2, 0x3fffffff, 1, 0, u32, u32, Mspmpuea_SPEC, crate::common::RW>
479    {
480        crate::common::RegisterField::<
481            2,
482            0x3fffffff,
483            1,
484            0,
485            u32,
486            u32,
487            Mspmpuea_SPEC,
488            crate::common::RW,
489        >::from_register(self, 0)
490    }
491}
492impl ::core::default::Default for Mspmpuea {
493    #[inline(always)]
494    fn default() -> Mspmpuea {
495        <crate::RegValueT<Mspmpuea_SPEC> as RegisterValue<_>>::new(3)
496    }
497}
498
499#[doc(hidden)]
500#[derive(Copy, Clone, Eq, PartialEq)]
501pub struct Pspmpuoad_SPEC;
502impl crate::sealed::RegSpec for Pspmpuoad_SPEC {
503    type DataType = u16;
504}
505
506#[doc = "Stack Pointer Monitor Operation After Detection Register"]
507pub type Pspmpuoad = crate::RegValueT<Pspmpuoad_SPEC>;
508
509impl Pspmpuoad {
510    #[doc = "Write Keyword The data written to these bits are not stored."]
511    #[inline(always)]
512    pub fn key(
513        self,
514    ) -> crate::common::RegisterField<
515        8,
516        0xff,
517        1,
518        0,
519        pspmpuoad::Key,
520        pspmpuoad::Key,
521        Pspmpuoad_SPEC,
522        crate::common::W,
523    > {
524        crate::common::RegisterField::<
525            8,
526            0xff,
527            1,
528            0,
529            pspmpuoad::Key,
530            pspmpuoad::Key,
531            Pspmpuoad_SPEC,
532            crate::common::W,
533        >::from_register(self, 0)
534    }
535
536    #[doc = "Operation after detection"]
537    #[inline(always)]
538    pub fn oad(
539        self,
540    ) -> crate::common::RegisterField<
541        0,
542        0x1,
543        1,
544        0,
545        pspmpuoad::Oad,
546        pspmpuoad::Oad,
547        Pspmpuoad_SPEC,
548        crate::common::RW,
549    > {
550        crate::common::RegisterField::<
551            0,
552            0x1,
553            1,
554            0,
555            pspmpuoad::Oad,
556            pspmpuoad::Oad,
557            Pspmpuoad_SPEC,
558            crate::common::RW,
559        >::from_register(self, 0)
560    }
561}
562impl ::core::default::Default for Pspmpuoad {
563    #[inline(always)]
564    fn default() -> Pspmpuoad {
565        <crate::RegValueT<Pspmpuoad_SPEC> as RegisterValue<_>>::new(0)
566    }
567}
568pub mod pspmpuoad {
569
570    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
571    pub struct Key_SPEC;
572    pub type Key = crate::EnumBitfieldStruct<u8, Key_SPEC>;
573    impl Key {
574        #[doc = "Writing to the OAD bit is valid, when the KEY bits are written 0xA5."]
575        pub const _0_X_A_5: Self = Self::new(165);
576    }
577    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
578    pub struct Oad_SPEC;
579    pub type Oad = crate::EnumBitfieldStruct<u8, Oad_SPEC>;
580    impl Oad {
581        #[doc = "Internal reset."]
582        pub const _1: Self = Self::new(1);
583
584        #[doc = "Non-maskable interrupt."]
585        pub const _0: Self = Self::new(0);
586    }
587}
588#[doc(hidden)]
589#[derive(Copy, Clone, Eq, PartialEq)]
590pub struct Pspmpuctl_SPEC;
591impl crate::sealed::RegSpec for Pspmpuctl_SPEC {
592    type DataType = u16;
593}
594
595#[doc = "Stack Pointer Monitor Access Control Register"]
596pub type Pspmpuctl = crate::RegValueT<Pspmpuctl_SPEC>;
597
598impl Pspmpuctl {
599    #[doc = "SP_process monitor error flag"]
600    #[inline(always)]
601    pub fn error(
602        self,
603    ) -> crate::common::RegisterField<
604        8,
605        0x1,
606        1,
607        0,
608        pspmpuctl::Error,
609        pspmpuctl::Error,
610        Pspmpuctl_SPEC,
611        crate::common::R,
612    > {
613        crate::common::RegisterField::<
614            8,
615            0x1,
616            1,
617            0,
618            pspmpuctl::Error,
619            pspmpuctl::Error,
620            Pspmpuctl_SPEC,
621            crate::common::R,
622        >::from_register(self, 0)
623    }
624
625    #[doc = "SP_process monitor enable"]
626    #[inline(always)]
627    pub fn enable(
628        self,
629    ) -> crate::common::RegisterField<
630        0,
631        0x1,
632        1,
633        0,
634        pspmpuctl::Enable,
635        pspmpuctl::Enable,
636        Pspmpuctl_SPEC,
637        crate::common::RW,
638    > {
639        crate::common::RegisterField::<
640            0,
641            0x1,
642            1,
643            0,
644            pspmpuctl::Enable,
645            pspmpuctl::Enable,
646            Pspmpuctl_SPEC,
647            crate::common::RW,
648        >::from_register(self, 0)
649    }
650}
651impl ::core::default::Default for Pspmpuctl {
652    #[inline(always)]
653    fn default() -> Pspmpuctl {
654        <crate::RegValueT<Pspmpuctl_SPEC> as RegisterValue<_>>::new(0)
655    }
656}
657pub mod pspmpuctl {
658
659    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
660    pub struct Error_SPEC;
661    pub type Error = crate::EnumBitfieldStruct<u8, Error_SPEC>;
662    impl Error {
663        #[doc = "SP_process has not overflowed or underflowed."]
664        pub const _0: Self = Self::new(0);
665
666        #[doc = "SP_process has overflowed or underflowed."]
667        pub const _1: Self = Self::new(1);
668    }
669    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
670    pub struct Enable_SPEC;
671    pub type Enable = crate::EnumBitfieldStruct<u8, Enable_SPEC>;
672    impl Enable {
673        #[doc = "SP_process monitor is disabled."]
674        pub const _0: Self = Self::new(0);
675
676        #[doc = "SP_process monitor is enabled."]
677        pub const _1: Self = Self::new(1);
678    }
679}
680#[doc(hidden)]
681#[derive(Copy, Clone, Eq, PartialEq)]
682pub struct Pspmpupt_SPEC;
683impl crate::sealed::RegSpec for Pspmpupt_SPEC {
684    type DataType = u16;
685}
686
687#[doc = "Stack Pointer Monitor Protection Register"]
688pub type Pspmpupt = crate::RegValueT<Pspmpupt_SPEC>;
689
690impl Pspmpupt {
691    #[doc = "Write Keyword The data written to these bits are not stored."]
692    #[inline(always)]
693    pub fn key(
694        self,
695    ) -> crate::common::RegisterField<
696        8,
697        0xff,
698        1,
699        0,
700        pspmpupt::Key,
701        pspmpupt::Key,
702        Pspmpupt_SPEC,
703        crate::common::W,
704    > {
705        crate::common::RegisterField::<
706            8,
707            0xff,
708            1,
709            0,
710            pspmpupt::Key,
711            pspmpupt::Key,
712            Pspmpupt_SPEC,
713            crate::common::W,
714        >::from_register(self, 0)
715    }
716
717    #[doc = "Protection of register (PSPMPUAC, PSPMPUSA and PSPMPUSE)"]
718    #[inline(always)]
719    pub fn protect(
720        self,
721    ) -> crate::common::RegisterField<
722        0,
723        0x1,
724        1,
725        0,
726        pspmpupt::Protect,
727        pspmpupt::Protect,
728        Pspmpupt_SPEC,
729        crate::common::RW,
730    > {
731        crate::common::RegisterField::<
732            0,
733            0x1,
734            1,
735            0,
736            pspmpupt::Protect,
737            pspmpupt::Protect,
738            Pspmpupt_SPEC,
739            crate::common::RW,
740        >::from_register(self, 0)
741    }
742}
743impl ::core::default::Default for Pspmpupt {
744    #[inline(always)]
745    fn default() -> Pspmpupt {
746        <crate::RegValueT<Pspmpupt_SPEC> as RegisterValue<_>>::new(0)
747    }
748}
749pub mod pspmpupt {
750
751    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
752    pub struct Key_SPEC;
753    pub type Key = crate::EnumBitfieldStruct<u8, Key_SPEC>;
754    impl Key {
755        #[doc = "Writing to the PROTECT bit is valid, when the KEY bits are written 0xA5."]
756        pub const _0_X_A_5: Self = Self::new(165);
757    }
758    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
759    pub struct Protect_SPEC;
760    pub type Protect = crate::EnumBitfieldStruct<u8, Protect_SPEC>;
761    impl Protect {
762        #[doc = "Stack Pointer Monitor register writing is possible."]
763        pub const _0: Self = Self::new(0);
764
765        #[doc = "Stack Pointer Monitor register writing is protected."]
766        pub const _1: Self = Self::new(1);
767    }
768}
769#[doc(hidden)]
770#[derive(Copy, Clone, Eq, PartialEq)]
771pub struct Pspmpusa_SPEC;
772impl crate::sealed::RegSpec for Pspmpusa_SPEC {
773    type DataType = u32;
774}
775
776#[doc = "Process Stack Pointer Monitor Start Address Register"]
777pub type Pspmpusa = crate::RegValueT<Pspmpusa_SPEC>;
778
779impl Pspmpusa {
780    #[doc = "Region start address register Address where the region starts, for use in region determination.NOTE: Range: 0x1FF00000-0x200FFFFC         The low-order 2 bits are fixed to 0."]
781    #[inline(always)]
782    pub fn pspmpusa(
783        self,
784    ) -> crate::common::RegisterField<2, 0x3fffffff, 1, 0, u32, u32, Pspmpusa_SPEC, crate::common::RW>
785    {
786        crate::common::RegisterField::<
787            2,
788            0x3fffffff,
789            1,
790            0,
791            u32,
792            u32,
793            Pspmpusa_SPEC,
794            crate::common::RW,
795        >::from_register(self, 0)
796    }
797}
798impl ::core::default::Default for Pspmpusa {
799    #[inline(always)]
800    fn default() -> Pspmpusa {
801        <crate::RegValueT<Pspmpusa_SPEC> as RegisterValue<_>>::new(0)
802    }
803}
804
805#[doc(hidden)]
806#[derive(Copy, Clone, Eq, PartialEq)]
807pub struct Pspmpuea_SPEC;
808impl crate::sealed::RegSpec for Pspmpuea_SPEC {
809    type DataType = u32;
810}
811
812#[doc = "Process Stack Pointer Monitor End Address Register"]
813pub type Pspmpuea = crate::RegValueT<Pspmpuea_SPEC>;
814
815impl Pspmpuea {
816    #[doc = "Region end address register Address where the region starts, for use in region determination.NOTE: Range: 0x1FF00003-0x200FFFFF         The low-order 2 bits are fixed to 1."]
817    #[inline(always)]
818    pub fn pspmpuea(
819        self,
820    ) -> crate::common::RegisterField<2, 0x3fffffff, 1, 0, u32, u32, Pspmpuea_SPEC, crate::common::RW>
821    {
822        crate::common::RegisterField::<
823            2,
824            0x3fffffff,
825            1,
826            0,
827            u32,
828            u32,
829            Pspmpuea_SPEC,
830            crate::common::RW,
831        >::from_register(self, 0)
832    }
833}
834impl ::core::default::Default for Pspmpuea {
835    #[inline(always)]
836    fn default() -> Pspmpuea {
837        <crate::RegValueT<Pspmpuea_SPEC> as RegisterValue<_>>::new(3)
838    }
839}