aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/chips/nrf54l15_app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-nrf/src/chips/nrf54l15_app.rs')
-rw-r--r--embassy-nrf/src/chips/nrf54l15_app.rs392
1 files changed, 384 insertions, 8 deletions
diff --git a/embassy-nrf/src/chips/nrf54l15_app.rs b/embassy-nrf/src/chips/nrf54l15_app.rs
index ff05bbec0..8e6595248 100644
--- a/embassy-nrf/src/chips/nrf54l15_app.rs
+++ b/embassy-nrf/src/chips/nrf54l15_app.rs
@@ -26,7 +26,6 @@ pub mod pac {
26 PPIB10_NS as PPIB10, 26 PPIB10_NS as PPIB10,
27 PPIB11_NS as PPIB11, 27 PPIB11_NS as PPIB11,
28 TIMER10_NS as TIMER10, 28 TIMER10_NS as TIMER10,
29 RTC10_NS as RTC10,
30 EGU10_NS as EGU10, 29 EGU10_NS as EGU10,
31 RADIO_NS as RADIO, 30 RADIO_NS as RADIO,
32 DPPIC20_NS as DPPIC20, 31 DPPIC20_NS as DPPIC20,
@@ -76,7 +75,6 @@ pub mod pac {
76 TWIM30_NS as TWIM30, 75 TWIM30_NS as TWIM30,
77 TWIS30_NS as TWIS30, 76 TWIS30_NS as TWIS30,
78 UARTE30_NS as UARTE30, 77 UARTE30_NS as UARTE30,
79 RTC30_NS as RTC30,
80 COMP_NS as COMP, 78 COMP_NS as COMP,
81 LPCOMP_NS as LPCOMP, 79 LPCOMP_NS as LPCOMP,
82 WDT31_NS as WDT31, 80 WDT31_NS as WDT31,
@@ -94,6 +92,7 @@ pub mod pac {
94 #[cfg(feature = "_s")] 92 #[cfg(feature = "_s")]
95 #[doc(no_inline)] 93 #[doc(no_inline)]
96 pub use nrf_pac::{ 94 pub use nrf_pac::{
95 FICR_NS as FICR,
97 SICR_S as SICR, 96 SICR_S as SICR,
98 ICACHEDATA_S as ICACHEDATA, 97 ICACHEDATA_S as ICACHEDATA,
99 ICACHEINFO_S as ICACHEINFO, 98 ICACHEINFO_S as ICACHEINFO,
@@ -126,7 +125,6 @@ pub mod pac {
126 PPIB10_S as PPIB10, 125 PPIB10_S as PPIB10,
127 PPIB11_S as PPIB11, 126 PPIB11_S as PPIB11,
128 TIMER10_S as TIMER10, 127 TIMER10_S as TIMER10,
129 RTC10_S as RTC10,
130 EGU10_S as EGU10, 128 EGU10_S as EGU10,
131 RADIO_S as RADIO, 129 RADIO_S as RADIO,
132 SPU20_S as SPU20, 130 SPU20_S as SPU20,
@@ -179,7 +177,6 @@ pub mod pac {
179 TWIM30_S as TWIM30, 177 TWIM30_S as TWIM30,
180 TWIS30_S as TWIS30, 178 TWIS30_S as TWIS30,
181 UARTE30_S as UARTE30, 179 UARTE30_S as UARTE30,
182 RTC30_S as RTC30,
183 COMP_S as COMP, 180 COMP_S as COMP,
184 LPCOMP_S as LPCOMP, 181 LPCOMP_S as LPCOMP,
185 WDT30_S as WDT30, 182 WDT30_S as WDT30,
@@ -199,13 +196,180 @@ pub mod pac {
199 196
200/// The maximum buffer size that the EasyDMA can send/recv in one operation. 197/// The maximum buffer size that the EasyDMA can send/recv in one operation.
201pub const EASY_DMA_SIZE: usize = (1 << 16) - 1; 198pub const EASY_DMA_SIZE: usize = (1 << 16) - 1;
202//pub const FORCE_COPY_BUFFER_SIZE: usize = 1024; 199pub const FORCE_COPY_BUFFER_SIZE: usize = 1024;
203 200
204// 1.5 MB NVM 201// 1.5 MB NVM
205#[allow(unused)] 202#[allow(unused)]
206pub const FLASH_SIZE: usize = 1536 * 1024; 203pub const FLASH_SIZE: usize = 1524 * 1024;
207 204
208embassy_hal_internal::peripherals! { 205embassy_hal_internal::peripherals! {
206 // PPI
207 PPI00_CH0,
208 PPI00_CH1,
209 PPI00_CH2,
210 PPI00_CH3,
211 PPI00_CH4,
212 PPI00_CH5,
213 PPI00_CH6,
214 PPI00_CH7,
215
216 PPI10_CH0,
217 PPI10_CH1,
218 PPI10_CH2,
219 PPI10_CH3,
220 PPI10_CH4,
221 PPI10_CH5,
222 PPI10_CH6,
223 PPI10_CH7,
224 PPI10_CH8,
225 PPI10_CH9,
226 PPI10_CH10,
227 PPI10_CH11,
228 PPI10_CH12,
229 PPI10_CH13,
230 PPI10_CH14,
231 PPI10_CH15,
232 PPI10_CH16,
233 PPI10_CH17,
234 PPI10_CH18,
235 PPI10_CH19,
236 PPI10_CH20,
237 PPI10_CH21,
238 PPI10_CH22,
239 PPI10_CH23,
240
241 PPI20_CH0,
242 PPI20_CH1,
243 PPI20_CH2,
244 PPI20_CH3,
245 PPI20_CH4,
246 PPI20_CH5,
247 PPI20_CH6,
248 PPI20_CH7,
249 PPI20_CH8,
250 PPI20_CH9,
251 PPI20_CH10,
252 PPI20_CH11,
253 PPI20_CH12,
254 PPI20_CH13,
255 PPI20_CH14,
256 PPI20_CH15,
257
258 PPI30_CH0,
259 PPI30_CH1,
260 PPI30_CH2,
261 PPI30_CH3,
262
263 PPI00_GROUP0,
264 PPI00_GROUP1,
265
266 PPI10_GROUP0,
267 PPI10_GROUP1,
268 PPI10_GROUP2,
269 PPI10_GROUP3,
270 PPI10_GROUP4,
271 PPI10_GROUP5,
272
273 PPI20_GROUP0,
274 PPI20_GROUP1,
275 PPI20_GROUP2,
276 PPI20_GROUP3,
277 PPI20_GROUP4,
278 PPI20_GROUP5,
279
280 PPI30_GROUP0,
281 PPI30_GROUP1,
282
283 // PPI BRIDGE channels
284 PPIB00_CH0,
285 PPIB00_CH1,
286 PPIB00_CH2,
287 PPIB00_CH3,
288 PPIB00_CH4,
289 PPIB00_CH5,
290 PPIB00_CH6,
291 PPIB00_CH7,
292
293 PPIB01_CH0,
294 PPIB01_CH1,
295 PPIB01_CH2,
296 PPIB01_CH3,
297 PPIB01_CH4,
298 PPIB01_CH5,
299 PPIB01_CH6,
300 PPIB01_CH7,
301
302 PPIB10_CH0,
303 PPIB10_CH1,
304 PPIB10_CH2,
305 PPIB10_CH3,
306 PPIB10_CH4,
307 PPIB10_CH5,
308 PPIB10_CH6,
309 PPIB10_CH7,
310
311 PPIB11_CH0,
312 PPIB11_CH1,
313 PPIB11_CH2,
314 PPIB11_CH3,
315 PPIB11_CH4,
316 PPIB11_CH5,
317 PPIB11_CH6,
318 PPIB11_CH7,
319 PPIB11_CH8,
320 PPIB11_CH9,
321 PPIB11_CH10,
322 PPIB11_CH11,
323 PPIB11_CH12,
324 PPIB11_CH13,
325 PPIB11_CH14,
326 PPIB11_CH15,
327
328 PPIB20_CH0,
329 PPIB20_CH1,
330 PPIB20_CH2,
331 PPIB20_CH3,
332 PPIB20_CH4,
333 PPIB20_CH5,
334 PPIB20_CH6,
335 PPIB20_CH7,
336
337 PPIB21_CH0,
338 PPIB21_CH1,
339 PPIB21_CH2,
340 PPIB21_CH3,
341 PPIB21_CH4,
342 PPIB21_CH5,
343 PPIB21_CH6,
344 PPIB21_CH7,
345 PPIB21_CH8,
346 PPIB21_CH9,
347 PPIB21_CH10,
348 PPIB21_CH11,
349 PPIB21_CH12,
350 PPIB21_CH13,
351 PPIB21_CH14,
352 PPIB21_CH15,
353
354 PPIB22_CH0,
355 PPIB22_CH1,
356 PPIB22_CH2,
357 PPIB22_CH3,
358
359 PPIB30_CH0,
360 PPIB30_CH1,
361 PPIB30_CH2,
362 PPIB30_CH3,
363
364 // Timers
365 TIMER00,
366 TIMER10,
367 TIMER20,
368 TIMER21,
369 TIMER22,
370 TIMER23,
371 TIMER24,
372
209 // GPIO port 0 373 // GPIO port 0
210 P0_00, 374 P0_00,
211 P0_01, 375 P0_01,
@@ -248,6 +412,62 @@ embassy_hal_internal::peripherals! {
248 P2_09, 412 P2_09,
249 P2_10, 413 P2_10,
250 414
415 // GRTC
416 GRTC_CH0,
417 #[cfg(not(feature = "time-driver-grtc"))]
418 GRTC_CH1,
419 GRTC_CH2,
420 GRTC_CH3,
421 GRTC_CH4,
422 GRTC_CH5,
423 GRTC_CH6,
424 GRTC_CH7,
425 GRTC_CH8,
426 GRTC_CH9,
427 GRTC_CH10,
428 GRTC_CH11,
429
430 // PWM
431 PWM20,
432 PWM21,
433 PWM22,
434
435 // SERIAL
436 SERIAL00,
437 SERIAL20,
438 SERIAL21,
439 SERIAL22,
440 SERIAL30,
441
442 // SAADC
443 SAADC,
444
445 // RADIO
446 RADIO,
447
448
449 // GPIOTE instances
450 GPIOTE20,
451 GPIOTE30,
452
453 // GPIOTE channels
454 GPIOTE20_CH0,
455 GPIOTE20_CH1,
456 GPIOTE20_CH2,
457 GPIOTE20_CH3,
458 GPIOTE20_CH4,
459 GPIOTE20_CH5,
460 GPIOTE20_CH6,
461 GPIOTE20_CH7,
462 GPIOTE30_CH0,
463 GPIOTE30_CH1,
464 GPIOTE30_CH2,
465 GPIOTE30_CH3,
466
467 // CRACEN
468 #[cfg(feature = "_s")]
469 CRACEN,
470
251 #[cfg(feature = "_s")] 471 #[cfg(feature = "_s")]
252 // RRAMC 472 // RRAMC
253 RRAMC, 473 RRAMC,
@@ -302,12 +522,170 @@ impl_pin!(P2_08, 2, 8);
302impl_pin!(P2_09, 2, 9); 522impl_pin!(P2_09, 2, 9);
303impl_pin!(P2_10, 2, 10); 523impl_pin!(P2_10, 2, 10);
304 524
525cfg_if::cfg_if! {
526 if #[cfg(feature = "gpiote")] {
527 impl_gpiote_pin!(P0_00, GPIOTE30);
528 impl_gpiote_pin!(P0_01, GPIOTE30);
529 impl_gpiote_pin!(P0_02, GPIOTE30);
530 impl_gpiote_pin!(P0_03, GPIOTE30);
531 impl_gpiote_pin!(P0_04, GPIOTE30);
532 impl_gpiote_pin!(P0_05, GPIOTE30);
533 impl_gpiote_pin!(P0_06, GPIOTE30);
534
535 impl_gpiote_pin!(P1_00, GPIOTE20);
536 impl_gpiote_pin!(P1_01, GPIOTE20);
537 impl_gpiote_pin!(P1_02, GPIOTE20);
538 impl_gpiote_pin!(P1_03, GPIOTE20);
539 impl_gpiote_pin!(P1_04, GPIOTE20);
540 impl_gpiote_pin!(P1_05, GPIOTE20);
541 impl_gpiote_pin!(P1_06, GPIOTE20);
542 impl_gpiote_pin!(P1_07, GPIOTE20);
543 impl_gpiote_pin!(P1_08, GPIOTE20);
544 impl_gpiote_pin!(P1_09, GPIOTE20);
545 impl_gpiote_pin!(P1_10, GPIOTE20);
546 impl_gpiote_pin!(P1_11, GPIOTE20);
547 impl_gpiote_pin!(P1_12, GPIOTE20);
548 impl_gpiote_pin!(P1_13, GPIOTE20);
549 impl_gpiote_pin!(P1_14, GPIOTE20);
550 impl_gpiote_pin!(P1_15, GPIOTE20);
551 impl_gpiote_pin!(P1_16, GPIOTE20);
552 }
553}
554
305#[cfg(feature = "_ns")] 555#[cfg(feature = "_ns")]
306impl_wdt!(WDT, WDT31, WDT31, 0); 556impl_wdt!(WDT, WDT31, WDT31, 0);
307#[cfg(feature = "_s")] 557#[cfg(feature = "_s")]
308impl_wdt!(WDT0, WDT31, WDT31, 0); 558impl_wdt!(WDT0, WDT31, WDT31, 0);
309#[cfg(feature = "_s")] 559#[cfg(feature = "_s")]
310impl_wdt!(WDT1, WDT30, WDT30, 1); 560impl_wdt!(WDT1, WDT30, WDT30, 1);
561// DPPI00 channels
562impl_ppi_channel!(PPI00_CH0, DPPIC00, 0 => configurable);
563impl_ppi_channel!(PPI00_CH1, DPPIC00, 1 => configurable);
564impl_ppi_channel!(PPI00_CH2, DPPIC00, 2 => configurable);
565impl_ppi_channel!(PPI00_CH3, DPPIC00, 3 => configurable);
566impl_ppi_channel!(PPI00_CH4, DPPIC00, 4 => configurable);
567impl_ppi_channel!(PPI00_CH5, DPPIC00, 5 => configurable);
568impl_ppi_channel!(PPI00_CH6, DPPIC00, 6 => configurable);
569impl_ppi_channel!(PPI00_CH7, DPPIC00, 7 => configurable);
570
571// DPPI10 channels
572impl_ppi_channel!(PPI10_CH0, DPPIC10, 0 => static);
573
574// DPPI20 channels
575impl_ppi_channel!(PPI20_CH0, DPPIC20, 0 => configurable);
576impl_ppi_channel!(PPI20_CH1, DPPIC20, 1 => configurable);
577impl_ppi_channel!(PPI20_CH2, DPPIC20, 2 => configurable);
578impl_ppi_channel!(PPI20_CH3, DPPIC20, 3 => configurable);
579impl_ppi_channel!(PPI20_CH4, DPPIC20, 4 => configurable);
580impl_ppi_channel!(PPI20_CH5, DPPIC20, 5 => configurable);
581impl_ppi_channel!(PPI20_CH6, DPPIC20, 6 => configurable);
582impl_ppi_channel!(PPI20_CH7, DPPIC20, 7 => configurable);
583impl_ppi_channel!(PPI20_CH8, DPPIC20, 8 => configurable);
584impl_ppi_channel!(PPI20_CH9, DPPIC20, 9 => configurable);
585impl_ppi_channel!(PPI20_CH10, DPPIC20, 10 => configurable);
586impl_ppi_channel!(PPI20_CH11, DPPIC20, 11 => configurable);
587impl_ppi_channel!(PPI20_CH12, DPPIC20, 12 => configurable);
588impl_ppi_channel!(PPI20_CH13, DPPIC20, 13 => configurable);
589impl_ppi_channel!(PPI20_CH14, DPPIC20, 14 => configurable);
590impl_ppi_channel!(PPI20_CH15, DPPIC20, 15 => configurable);
591
592// DPPI30 channels
593impl_ppi_channel!(PPI30_CH0, DPPIC30, 0 => configurable);
594impl_ppi_channel!(PPI30_CH1, DPPIC30, 1 => configurable);
595impl_ppi_channel!(PPI30_CH2, DPPIC30, 2 => configurable);
596impl_ppi_channel!(PPI30_CH3, DPPIC30, 3 => configurable);
597
598// DPPI00 groups
599impl_ppi_group!(PPI00_GROUP0, DPPIC00, 0);
600impl_ppi_group!(PPI00_GROUP1, DPPIC00, 1);
601
602// DPPI10 groups
603impl_ppi_group!(PPI10_GROUP0, DPPIC10, 0);
604
605// DPPI20 groups
606impl_ppi_group!(PPI20_GROUP0, DPPIC20, 0);
607impl_ppi_group!(PPI20_GROUP1, DPPIC20, 1);
608impl_ppi_group!(PPI20_GROUP2, DPPIC20, 2);
609impl_ppi_group!(PPI20_GROUP3, DPPIC20, 3);
610impl_ppi_group!(PPI20_GROUP4, DPPIC20, 4);
611impl_ppi_group!(PPI20_GROUP5, DPPIC20, 5);
612
613// DPPI30 groups
614impl_ppi_group!(PPI30_GROUP0, DPPIC30, 0);
615impl_ppi_group!(PPI30_GROUP1, DPPIC30, 1);
616
617impl_timer!(TIMER00, TIMER00, TIMER00);
618impl_timer!(TIMER10, TIMER10, TIMER10);
619impl_timer!(TIMER20, TIMER20, TIMER20);
620impl_timer!(TIMER21, TIMER21, TIMER21);
621impl_timer!(TIMER22, TIMER22, TIMER22);
622impl_timer!(TIMER23, TIMER23, TIMER23);
623impl_timer!(TIMER24, TIMER24, TIMER24);
624
625impl_twim!(SERIAL20, TWIM20, SERIAL20);
626impl_twim!(SERIAL21, TWIM21, SERIAL21);
627impl_twim!(SERIAL22, TWIM22, SERIAL22);
628impl_twim!(SERIAL30, TWIM30, SERIAL30);
629
630impl_twis!(SERIAL20, TWIS20, SERIAL20);
631impl_twis!(SERIAL21, TWIS21, SERIAL21);
632impl_twis!(SERIAL22, TWIS22, SERIAL22);
633impl_twis!(SERIAL30, TWIS30, SERIAL30);
634
635impl_pwm!(PWM20, PWM20, PWM20);
636impl_pwm!(PWM21, PWM21, PWM21);
637impl_pwm!(PWM22, PWM22, PWM22);
638
639#[cfg(feature = "_s")]
640impl_spim!(
641 SERIAL00,
642 SPIM00,
643 SERIAL00,
644 match pac::OSCILLATORS_S.pll().currentfreq().read().currentfreq() {
645 pac::oscillators::vals::Currentfreq::CK128M => 128_000_000,
646 pac::oscillators::vals::Currentfreq::CK64M => 64_000_000,
647 _ => unreachable!(),
648 }
649);
650#[cfg(feature = "_ns")]
651impl_spim!(
652 SERIAL00,
653 SPIM00,
654 SERIAL00,
655 match pac::OSCILLATORS_NS.pll().currentfreq().read().currentfreq() {
656 pac::oscillators::vals::Currentfreq::CK128M => 128_000_000,
657 pac::oscillators::vals::Currentfreq::CK64M => 64_000_000,
658 _ => unreachable!(),
659 }
660);
661impl_spim!(SERIAL20, SPIM20, SERIAL20, 16_000_000);
662impl_spim!(SERIAL21, SPIM21, SERIAL21, 16_000_000);
663impl_spim!(SERIAL22, SPIM22, SERIAL22, 16_000_000);
664impl_spim!(SERIAL30, SPIM30, SERIAL30, 16_000_000);
665
666impl_spis!(SERIAL20, SPIS20, SERIAL20);
667impl_spis!(SERIAL21, SPIS21, SERIAL21);
668impl_spis!(SERIAL22, SPIS22, SERIAL22);
669impl_spis!(SERIAL30, SPIS30, SERIAL30);
670
671impl_uarte!(SERIAL00, UARTE00, SERIAL00);
672impl_uarte!(SERIAL20, UARTE20, SERIAL20);
673impl_uarte!(SERIAL21, UARTE21, SERIAL21);
674impl_uarte!(SERIAL22, UARTE22, SERIAL22);
675impl_uarte!(SERIAL30, UARTE30, SERIAL30);
676
677// NB: SAADC uses "pin" abstraction, not "AIN"
678impl_saadc_input!(P1_04, 1, 4);
679impl_saadc_input!(P1_05, 1, 5);
680impl_saadc_input!(P1_06, 1, 6);
681impl_saadc_input!(P1_07, 1, 7);
682impl_saadc_input!(P1_11, 1, 11);
683impl_saadc_input!(P1_12, 1, 12);
684impl_saadc_input!(P1_13, 1, 13);
685impl_saadc_input!(P1_14, 1, 14);
686
687#[cfg(feature = "_s")]
688impl_cracen!(CRACEN, CRACEN, CRACEN);
311 689
312embassy_hal_internal::interrupt_mod!( 690embassy_hal_internal::interrupt_mod!(
313 SWI00, 691 SWI00,
@@ -326,7 +704,6 @@ embassy_hal_internal::interrupt_mod!(
326 TIMER00, 704 TIMER00,
327 SPU10, 705 SPU10,
328 TIMER10, 706 TIMER10,
329 RTC10,
330 EGU10, 707 EGU10,
331 RADIO_0, 708 RADIO_0,
332 RADIO_1, 709 RADIO_1,
@@ -360,7 +737,6 @@ embassy_hal_internal::interrupt_mod!(
360 GRTC_3, 737 GRTC_3,
361 SPU30, 738 SPU30,
362 SERIAL30, 739 SERIAL30,
363 RTC30,
364 COMP_LPCOMP, 740 COMP_LPCOMP,
365 WDT30, 741 WDT30,
366 WDT31, 742 WDT31,