Skip to main content

ra2a1_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.1, with svd2pac 0.6.1 on Sun, 15 Mar 2026 07:00:31 +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 = "These bits are read as 0000000. The write value should be 0000000."]
195    #[inline(always)]
196    pub fn reserved(
197        self,
198    ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Mspmpuoad_SPEC, crate::common::RW>
199    {
200        crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Mspmpuoad_SPEC,crate::common::RW>::from_register(self,0)
201    }
202
203    #[doc = "Operation after detection"]
204    #[inline(always)]
205    pub fn oad(
206        self,
207    ) -> crate::common::RegisterField<
208        0,
209        0x1,
210        1,
211        0,
212        mspmpuoad::Oad,
213        mspmpuoad::Oad,
214        Mspmpuoad_SPEC,
215        crate::common::RW,
216    > {
217        crate::common::RegisterField::<
218            0,
219            0x1,
220            1,
221            0,
222            mspmpuoad::Oad,
223            mspmpuoad::Oad,
224            Mspmpuoad_SPEC,
225            crate::common::RW,
226        >::from_register(self, 0)
227    }
228}
229impl ::core::default::Default for Mspmpuoad {
230    #[inline(always)]
231    fn default() -> Mspmpuoad {
232        <crate::RegValueT<Mspmpuoad_SPEC> as RegisterValue<_>>::new(0)
233    }
234}
235pub mod mspmpuoad {
236
237    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
238    pub struct Key_SPEC;
239    pub type Key = crate::EnumBitfieldStruct<u8, Key_SPEC>;
240    impl Key {
241        #[doc = "Writing to the OAD bit is valid, when the KEY bits are written 0xA5."]
242        pub const _0_X_A_5: Self = Self::new(165);
243    }
244    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
245    pub struct Oad_SPEC;
246    pub type Oad = crate::EnumBitfieldStruct<u8, Oad_SPEC>;
247    impl Oad {
248        #[doc = "Internal reset."]
249        pub const _1: Self = Self::new(1);
250
251        #[doc = "Non-maskable interrupt."]
252        pub const _0: Self = Self::new(0);
253    }
254}
255#[doc(hidden)]
256#[derive(Copy, Clone, Eq, PartialEq)]
257pub struct Mspmpuctl_SPEC;
258impl crate::sealed::RegSpec for Mspmpuctl_SPEC {
259    type DataType = u16;
260}
261
262#[doc = "Stack Pointer Monitor Access Control Register"]
263pub type Mspmpuctl = crate::RegValueT<Mspmpuctl_SPEC>;
264
265impl Mspmpuctl {
266    #[doc = "SP_main monitor error flag"]
267    #[inline(always)]
268    pub fn error(
269        self,
270    ) -> crate::common::RegisterField<
271        8,
272        0x1,
273        1,
274        0,
275        mspmpuctl::Error,
276        mspmpuctl::Error,
277        Mspmpuctl_SPEC,
278        crate::common::R,
279    > {
280        crate::common::RegisterField::<
281            8,
282            0x1,
283            1,
284            0,
285            mspmpuctl::Error,
286            mspmpuctl::Error,
287            Mspmpuctl_SPEC,
288            crate::common::R,
289        >::from_register(self, 0)
290    }
291
292    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
293    #[inline(always)]
294    pub fn reserved(
295        self,
296    ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Mspmpuctl_SPEC, crate::common::RW>
297    {
298        crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Mspmpuctl_SPEC,crate::common::RW>::from_register(self,0)
299    }
300
301    #[doc = "SP_main monitor enable"]
302    #[inline(always)]
303    pub fn enable(
304        self,
305    ) -> crate::common::RegisterField<
306        0,
307        0x1,
308        1,
309        0,
310        mspmpuctl::Enable,
311        mspmpuctl::Enable,
312        Mspmpuctl_SPEC,
313        crate::common::RW,
314    > {
315        crate::common::RegisterField::<
316            0,
317            0x1,
318            1,
319            0,
320            mspmpuctl::Enable,
321            mspmpuctl::Enable,
322            Mspmpuctl_SPEC,
323            crate::common::RW,
324        >::from_register(self, 0)
325    }
326}
327impl ::core::default::Default for Mspmpuctl {
328    #[inline(always)]
329    fn default() -> Mspmpuctl {
330        <crate::RegValueT<Mspmpuctl_SPEC> as RegisterValue<_>>::new(0)
331    }
332}
333pub mod mspmpuctl {
334
335    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
336    pub struct Error_SPEC;
337    pub type Error = crate::EnumBitfieldStruct<u8, Error_SPEC>;
338    impl Error {
339        #[doc = "SP_main has not overflowed or underflowed."]
340        pub const _0: Self = Self::new(0);
341
342        #[doc = "SP_main has overflowed or underflowed."]
343        pub const _1: Self = Self::new(1);
344    }
345    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
346    pub struct Enable_SPEC;
347    pub type Enable = crate::EnumBitfieldStruct<u8, Enable_SPEC>;
348    impl Enable {
349        #[doc = "SP_main monitor is disabled."]
350        pub const _0: Self = Self::new(0);
351
352        #[doc = "SP_main monitor is enabled."]
353        pub const _1: Self = Self::new(1);
354    }
355}
356#[doc(hidden)]
357#[derive(Copy, Clone, Eq, PartialEq)]
358pub struct Mspmpupt_SPEC;
359impl crate::sealed::RegSpec for Mspmpupt_SPEC {
360    type DataType = u16;
361}
362
363#[doc = "Stack Pointer Monitor Protection Register"]
364pub type Mspmpupt = crate::RegValueT<Mspmpupt_SPEC>;
365
366impl Mspmpupt {
367    #[doc = "Write Keyword The data written to these bits are not stored."]
368    #[inline(always)]
369    pub fn key(
370        self,
371    ) -> crate::common::RegisterField<
372        8,
373        0xff,
374        1,
375        0,
376        mspmpupt::Key,
377        mspmpupt::Key,
378        Mspmpupt_SPEC,
379        crate::common::W,
380    > {
381        crate::common::RegisterField::<
382            8,
383            0xff,
384            1,
385            0,
386            mspmpupt::Key,
387            mspmpupt::Key,
388            Mspmpupt_SPEC,
389            crate::common::W,
390        >::from_register(self, 0)
391    }
392
393    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
394    #[inline(always)]
395    pub fn reserved(
396        self,
397    ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Mspmpupt_SPEC, crate::common::RW> {
398        crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Mspmpupt_SPEC,crate::common::RW>::from_register(self,0)
399    }
400
401    #[doc = "Protection of register (MSPMPUAC, MSPMPUSA and MSPMPUSE)"]
402    #[inline(always)]
403    pub fn protect(
404        self,
405    ) -> crate::common::RegisterField<
406        0,
407        0x1,
408        1,
409        0,
410        mspmpupt::Protect,
411        mspmpupt::Protect,
412        Mspmpupt_SPEC,
413        crate::common::RW,
414    > {
415        crate::common::RegisterField::<
416            0,
417            0x1,
418            1,
419            0,
420            mspmpupt::Protect,
421            mspmpupt::Protect,
422            Mspmpupt_SPEC,
423            crate::common::RW,
424        >::from_register(self, 0)
425    }
426}
427impl ::core::default::Default for Mspmpupt {
428    #[inline(always)]
429    fn default() -> Mspmpupt {
430        <crate::RegValueT<Mspmpupt_SPEC> as RegisterValue<_>>::new(0)
431    }
432}
433pub mod mspmpupt {
434
435    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
436    pub struct Key_SPEC;
437    pub type Key = crate::EnumBitfieldStruct<u8, Key_SPEC>;
438    impl Key {
439        #[doc = "Writing to the PROTECT bit is valid, when the KEY bits are written 0xA5."]
440        pub const _0_X_A_5: Self = Self::new(165);
441    }
442    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
443    pub struct Protect_SPEC;
444    pub type Protect = crate::EnumBitfieldStruct<u8, Protect_SPEC>;
445    impl Protect {
446        #[doc = "Stack Pointer Monitor register writing is possible."]
447        pub const _0: Self = Self::new(0);
448
449        #[doc = "Stack Pointer Monitor register writing is protected."]
450        pub const _1: Self = Self::new(1);
451    }
452}
453#[doc(hidden)]
454#[derive(Copy, Clone, Eq, PartialEq)]
455pub struct Mspmpusa_SPEC;
456impl crate::sealed::RegSpec for Mspmpusa_SPEC {
457    type DataType = u32;
458}
459
460#[doc = "Main Stack Pointer Monitor Start Address Register"]
461pub type Mspmpusa = crate::RegValueT<Mspmpusa_SPEC>;
462
463impl Mspmpusa {
464    #[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."]
465    #[inline(always)]
466    pub fn mspmpusa(
467        self,
468    ) -> crate::common::RegisterField<0, 0xffffffff, 1, 0, u32, u32, Mspmpusa_SPEC, crate::common::RW>
469    {
470        crate::common::RegisterField::<
471            0,
472            0xffffffff,
473            1,
474            0,
475            u32,
476            u32,
477            Mspmpusa_SPEC,
478            crate::common::RW,
479        >::from_register(self, 0)
480    }
481}
482impl ::core::default::Default for Mspmpusa {
483    #[inline(always)]
484    fn default() -> Mspmpusa {
485        <crate::RegValueT<Mspmpusa_SPEC> as RegisterValue<_>>::new(0)
486    }
487}
488
489#[doc(hidden)]
490#[derive(Copy, Clone, Eq, PartialEq)]
491pub struct Mspmpuea_SPEC;
492impl crate::sealed::RegSpec for Mspmpuea_SPEC {
493    type DataType = u32;
494}
495
496#[doc = "Main Stack Pointer Monitor End Address Register"]
497pub type Mspmpuea = crate::RegValueT<Mspmpuea_SPEC>;
498
499impl Mspmpuea {
500    #[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."]
501    #[inline(always)]
502    pub fn mspmpuea(
503        self,
504    ) -> crate::common::RegisterField<0, 0xffffffff, 1, 0, u32, u32, Mspmpuea_SPEC, crate::common::RW>
505    {
506        crate::common::RegisterField::<
507            0,
508            0xffffffff,
509            1,
510            0,
511            u32,
512            u32,
513            Mspmpuea_SPEC,
514            crate::common::RW,
515        >::from_register(self, 0)
516    }
517}
518impl ::core::default::Default for Mspmpuea {
519    #[inline(always)]
520    fn default() -> Mspmpuea {
521        <crate::RegValueT<Mspmpuea_SPEC> as RegisterValue<_>>::new(3)
522    }
523}
524
525#[doc(hidden)]
526#[derive(Copy, Clone, Eq, PartialEq)]
527pub struct Pspmpuoad_SPEC;
528impl crate::sealed::RegSpec for Pspmpuoad_SPEC {
529    type DataType = u16;
530}
531
532#[doc = "Stack Pointer Monitor Operation After Detection Register"]
533pub type Pspmpuoad = crate::RegValueT<Pspmpuoad_SPEC>;
534
535impl Pspmpuoad {
536    #[doc = "Write Keyword The data written to these bits are not stored."]
537    #[inline(always)]
538    pub fn key(
539        self,
540    ) -> crate::common::RegisterField<
541        8,
542        0xff,
543        1,
544        0,
545        pspmpuoad::Key,
546        pspmpuoad::Key,
547        Pspmpuoad_SPEC,
548        crate::common::W,
549    > {
550        crate::common::RegisterField::<
551            8,
552            0xff,
553            1,
554            0,
555            pspmpuoad::Key,
556            pspmpuoad::Key,
557            Pspmpuoad_SPEC,
558            crate::common::W,
559        >::from_register(self, 0)
560    }
561
562    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
563    #[inline(always)]
564    pub fn reserved(
565        self,
566    ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Pspmpuoad_SPEC, crate::common::RW>
567    {
568        crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Pspmpuoad_SPEC,crate::common::RW>::from_register(self,0)
569    }
570
571    #[doc = "Operation after detection"]
572    #[inline(always)]
573    pub fn oad(
574        self,
575    ) -> crate::common::RegisterField<
576        0,
577        0x1,
578        1,
579        0,
580        pspmpuoad::Oad,
581        pspmpuoad::Oad,
582        Pspmpuoad_SPEC,
583        crate::common::RW,
584    > {
585        crate::common::RegisterField::<
586            0,
587            0x1,
588            1,
589            0,
590            pspmpuoad::Oad,
591            pspmpuoad::Oad,
592            Pspmpuoad_SPEC,
593            crate::common::RW,
594        >::from_register(self, 0)
595    }
596}
597impl ::core::default::Default for Pspmpuoad {
598    #[inline(always)]
599    fn default() -> Pspmpuoad {
600        <crate::RegValueT<Pspmpuoad_SPEC> as RegisterValue<_>>::new(0)
601    }
602}
603pub mod pspmpuoad {
604
605    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
606    pub struct Key_SPEC;
607    pub type Key = crate::EnumBitfieldStruct<u8, Key_SPEC>;
608    impl Key {
609        #[doc = "Writing to the OAD bit is valid, when the KEY bits are written 0xA5."]
610        pub const _0_X_A_5: Self = Self::new(165);
611    }
612    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
613    pub struct Oad_SPEC;
614    pub type Oad = crate::EnumBitfieldStruct<u8, Oad_SPEC>;
615    impl Oad {
616        #[doc = "Internal reset."]
617        pub const _1: Self = Self::new(1);
618
619        #[doc = "Non-maskable interrupt."]
620        pub const _0: Self = Self::new(0);
621    }
622}
623#[doc(hidden)]
624#[derive(Copy, Clone, Eq, PartialEq)]
625pub struct Pspmpuctl_SPEC;
626impl crate::sealed::RegSpec for Pspmpuctl_SPEC {
627    type DataType = u16;
628}
629
630#[doc = "Stack Pointer Monitor Access Control Register"]
631pub type Pspmpuctl = crate::RegValueT<Pspmpuctl_SPEC>;
632
633impl Pspmpuctl {
634    #[doc = "SP_process monitor error flag"]
635    #[inline(always)]
636    pub fn error(
637        self,
638    ) -> crate::common::RegisterField<
639        8,
640        0x1,
641        1,
642        0,
643        pspmpuctl::Error,
644        pspmpuctl::Error,
645        Pspmpuctl_SPEC,
646        crate::common::R,
647    > {
648        crate::common::RegisterField::<
649            8,
650            0x1,
651            1,
652            0,
653            pspmpuctl::Error,
654            pspmpuctl::Error,
655            Pspmpuctl_SPEC,
656            crate::common::R,
657        >::from_register(self, 0)
658    }
659
660    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
661    #[inline(always)]
662    pub fn reserved(
663        self,
664    ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Pspmpuctl_SPEC, crate::common::RW>
665    {
666        crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Pspmpuctl_SPEC,crate::common::RW>::from_register(self,0)
667    }
668
669    #[doc = "SP_process monitor enable"]
670    #[inline(always)]
671    pub fn enable(
672        self,
673    ) -> crate::common::RegisterField<
674        0,
675        0x1,
676        1,
677        0,
678        pspmpuctl::Enable,
679        pspmpuctl::Enable,
680        Pspmpuctl_SPEC,
681        crate::common::RW,
682    > {
683        crate::common::RegisterField::<
684            0,
685            0x1,
686            1,
687            0,
688            pspmpuctl::Enable,
689            pspmpuctl::Enable,
690            Pspmpuctl_SPEC,
691            crate::common::RW,
692        >::from_register(self, 0)
693    }
694}
695impl ::core::default::Default for Pspmpuctl {
696    #[inline(always)]
697    fn default() -> Pspmpuctl {
698        <crate::RegValueT<Pspmpuctl_SPEC> as RegisterValue<_>>::new(0)
699    }
700}
701pub mod pspmpuctl {
702
703    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
704    pub struct Error_SPEC;
705    pub type Error = crate::EnumBitfieldStruct<u8, Error_SPEC>;
706    impl Error {
707        #[doc = "SP_process has not overflowed or underflowed."]
708        pub const _0: Self = Self::new(0);
709
710        #[doc = "SP_process has overflowed or underflowed."]
711        pub const _1: Self = Self::new(1);
712    }
713    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
714    pub struct Enable_SPEC;
715    pub type Enable = crate::EnumBitfieldStruct<u8, Enable_SPEC>;
716    impl Enable {
717        #[doc = "SP_process monitor is disabled."]
718        pub const _0: Self = Self::new(0);
719
720        #[doc = "SP_process monitor is enabled."]
721        pub const _1: Self = Self::new(1);
722    }
723}
724#[doc(hidden)]
725#[derive(Copy, Clone, Eq, PartialEq)]
726pub struct Pspmpupt_SPEC;
727impl crate::sealed::RegSpec for Pspmpupt_SPEC {
728    type DataType = u16;
729}
730
731#[doc = "Stack Pointer Monitor Protection Register"]
732pub type Pspmpupt = crate::RegValueT<Pspmpupt_SPEC>;
733
734impl Pspmpupt {
735    #[doc = "Write Keyword The data written to these bits are not stored."]
736    #[inline(always)]
737    pub fn key(
738        self,
739    ) -> crate::common::RegisterField<
740        8,
741        0xff,
742        1,
743        0,
744        pspmpupt::Key,
745        pspmpupt::Key,
746        Pspmpupt_SPEC,
747        crate::common::W,
748    > {
749        crate::common::RegisterField::<
750            8,
751            0xff,
752            1,
753            0,
754            pspmpupt::Key,
755            pspmpupt::Key,
756            Pspmpupt_SPEC,
757            crate::common::W,
758        >::from_register(self, 0)
759    }
760
761    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
762    #[inline(always)]
763    pub fn reserved(
764        self,
765    ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Pspmpupt_SPEC, crate::common::RW> {
766        crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Pspmpupt_SPEC,crate::common::RW>::from_register(self,0)
767    }
768
769    #[doc = "Protection of register (PSPMPUAC, PSPMPUSA and PSPMPUSE)"]
770    #[inline(always)]
771    pub fn protect(
772        self,
773    ) -> crate::common::RegisterField<
774        0,
775        0x1,
776        1,
777        0,
778        pspmpupt::Protect,
779        pspmpupt::Protect,
780        Pspmpupt_SPEC,
781        crate::common::RW,
782    > {
783        crate::common::RegisterField::<
784            0,
785            0x1,
786            1,
787            0,
788            pspmpupt::Protect,
789            pspmpupt::Protect,
790            Pspmpupt_SPEC,
791            crate::common::RW,
792        >::from_register(self, 0)
793    }
794}
795impl ::core::default::Default for Pspmpupt {
796    #[inline(always)]
797    fn default() -> Pspmpupt {
798        <crate::RegValueT<Pspmpupt_SPEC> as RegisterValue<_>>::new(0)
799    }
800}
801pub mod pspmpupt {
802
803    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
804    pub struct Key_SPEC;
805    pub type Key = crate::EnumBitfieldStruct<u8, Key_SPEC>;
806    impl Key {
807        #[doc = "Writing to the PROTECT bit is valid, when the KEY bits are written 0xA5."]
808        pub const _0_X_A_5: Self = Self::new(165);
809    }
810    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
811    pub struct Protect_SPEC;
812    pub type Protect = crate::EnumBitfieldStruct<u8, Protect_SPEC>;
813    impl Protect {
814        #[doc = "Stack Pointer Monitor register writing is possible."]
815        pub const _0: Self = Self::new(0);
816
817        #[doc = "Stack Pointer Monitor register writing is protected."]
818        pub const _1: Self = Self::new(1);
819    }
820}
821#[doc(hidden)]
822#[derive(Copy, Clone, Eq, PartialEq)]
823pub struct Pspmpusa_SPEC;
824impl crate::sealed::RegSpec for Pspmpusa_SPEC {
825    type DataType = u32;
826}
827
828#[doc = "Process Stack Pointer Monitor Start Address Register"]
829pub type Pspmpusa = crate::RegValueT<Pspmpusa_SPEC>;
830
831impl Pspmpusa {
832    #[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."]
833    #[inline(always)]
834    pub fn pspmpusa(
835        self,
836    ) -> crate::common::RegisterField<0, 0xffffffff, 1, 0, u32, u32, Pspmpusa_SPEC, crate::common::RW>
837    {
838        crate::common::RegisterField::<
839            0,
840            0xffffffff,
841            1,
842            0,
843            u32,
844            u32,
845            Pspmpusa_SPEC,
846            crate::common::RW,
847        >::from_register(self, 0)
848    }
849}
850impl ::core::default::Default for Pspmpusa {
851    #[inline(always)]
852    fn default() -> Pspmpusa {
853        <crate::RegValueT<Pspmpusa_SPEC> as RegisterValue<_>>::new(0)
854    }
855}
856
857#[doc(hidden)]
858#[derive(Copy, Clone, Eq, PartialEq)]
859pub struct Pspmpuea_SPEC;
860impl crate::sealed::RegSpec for Pspmpuea_SPEC {
861    type DataType = u32;
862}
863
864#[doc = "Process Stack Pointer Monitor End Address Register"]
865pub type Pspmpuea = crate::RegValueT<Pspmpuea_SPEC>;
866
867impl Pspmpuea {
868    #[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."]
869    #[inline(always)]
870    pub fn pspmpuea(
871        self,
872    ) -> crate::common::RegisterField<0, 0xffffffff, 1, 0, u32, u32, Pspmpuea_SPEC, crate::common::RW>
873    {
874        crate::common::RegisterField::<
875            0,
876            0xffffffff,
877            1,
878            0,
879            u32,
880            u32,
881            Pspmpuea_SPEC,
882            crate::common::RW,
883        >::from_register(self, 0)
884    }
885}
886impl ::core::default::Default for Pspmpuea {
887    #[inline(always)]
888    fn default() -> Pspmpuea {
889        <crate::RegValueT<Pspmpuea_SPEC> as RegisterValue<_>>::new(3)
890    }
891}