@@ -68,9 +68,9 @@ auto __my_startup() -> void
6868 mcal::wdg::secure::trigger ();
6969
7070 // Jump to __main, which calls __main_core0, the main
71- // function of core 0 . The main function of core 0
72- // itself then subsequently starts up core 1 which
73- // is launched in __main_core1. Both of these core 0 /1
71+ // function of core0 . The main function of core0
72+ // itself then subsequently starts up core1 which
73+ // is launched in __main_core1. Both of these core0 /1
7474 // subroutines will never return.
7575
7676 ::__main ();
@@ -86,17 +86,17 @@ auto __my_startup() -> void
8686extern " C"
8787auto __main () -> void
8888{
89- // Run the main function of core 0 .
90- // This will subsequently start core 1 .
89+ // Run the main function of core0 .
90+ // This will subsequently start core1 .
9191 ::__main_core0 ();
9292
93- // Synchronize with core 1 .
93+ // Synchronize with core1 .
9494 mcal::cpu::rp2350::multicore_sync (local::get_cpuid ());
9595
9696 // It is here that an actual application could
97- // be started and then executed on core 0 .
97+ // be started and then executed on core0 .
9898
99- // Execute an endless loop on core 0 (while the application runs on core 1 ).
99+ // Execute an endless loop on core0 (while the application runs on core1 ).
100100 for (;;) { mcal::cpu::nop (); }
101101
102102 // This point is never reached.
@@ -105,45 +105,45 @@ auto __main() -> void
105105extern " C"
106106auto __main_core0 () -> void
107107{
108- // Disable interrupts on core 0 .
108+ // Disable interrupts on core0 .
109109 mcal::irq::disable_all ();
110110
111- // Start core 1 and verify successful initiaization of core 1 .
111+ // Start core1 and verify successful initiaization of core1 .
112112 if (!mcal::cpu::rp2350::start_core1 ())
113113 {
114- // In case of error, loop forever (on core 0 ).
114+ // In case of error, loop forever (on core0 ).
115115 for (;;)
116116 {
117117 // Replace with a loud error if desired.
118118 mcal::wdg::secure::trigger ();
119119 }
120120 }
121121
122- // This flag will be set by core 1 (which is now running).
122+ // This flag will be set by core1 (which is now running).
123123 while (!core_1_run_flag_get ())
124124 {
125125 mcal::cpu::nop ();
126126 }
127127
128- // This subroutine (running on core 0 ) *does* return
128+ // This subroutine (running on core0 ) *does* return
129129 // at this point here.
130130}
131131
132132extern " C"
133133auto __main_core1 () -> void
134134{
135- // Disable interrupts on core 1 .
135+ // Disable interrupts on core1 .
136136 mcal::irq::disable_all ();
137137
138138 core_1_run_flag_set (true );
139139
140- // Core 1 is started via interrupt enabled by the BootRom.
141- // But core 1 remains in an interrupt handler until core 0
142- // actually manually starts core 1 in the subroutine
143- // mcal::cpu::rp2040::start_core1(). Execution on core 1
140+ // Core1 is started via interrupt enabled by the BootRom.
141+ // But core1 remains in an interrupt handler until core0
142+ // actually manually starts core1 in the subroutine
143+ // mcal::cpu::rp2040::start_core1(). Execution on core1
144144 // begins here.
145145
146- // Clear the sticky bits of the FIFO_ST on core 1 .
146+ // Clear the sticky bits of the FIFO_ST on core1 .
147147 // HW_PER_SIO->FIFO_ST.reg = 0xFFu;
148148 mcal::reg::reg_access_static<std::uint32_t ,
149149 std::uint32_t ,
@@ -162,18 +162,18 @@ auto __main_core1() -> void
162162
163163 asm volatile (" dsb" );
164164
165- // Clear all pending interrupts on core 1 .
165+ // Clear all pending interrupts on core1 .
166166
167167 // NVIC->ICPR[0U] = static_cast<std::uint32_t>(UINT32_C(0xFFFFFFFF));
168168 mcal::reg::reg_access_static<std::uint32_t ,
169169 std::uint32_t ,
170170 mcal::reg::nvic_icpr,
171171 std::uint32_t { UINT32_C (0xFFFFFFFF ) }>::reg_set ();
172172
173- // Synchronize with core 0 .
173+ // Synchronize with core0 .
174174 mcal::cpu::rp2350::multicore_sync (local::get_cpuid ());
175175
176- // Enable the hardware FPU on Core 1 .
176+ // Enable the hardware FPU on core1 .
177177
178178 mcal::reg::reg_access_static<std::uint32_t ,
179179 std::uint32_t ,
@@ -185,7 +185,7 @@ auto __main_core1() -> void
185185 mcal::reg::ppb_cpacr,
186186 std::uint32_t { (3UL << 20U ) | (3UL << 22U ) }>::reg_or ();
187187
188- // Jump to main on core 1 (and never return).
188+ // Jump to main on core1 (and never return).
189189 asm volatile (" ldr r3, =main" );
190190 asm volatile (" blx r3" );
191191}
0 commit comments