Merge pull request #3777 from adom-inc/rp2350-watchdog-fix
fix: enable RP2350 watchdog tick generator
This commit is contained in:
		
						commit
						1d8ef6faa2
					
				@ -524,8 +524,13 @@ pub(crate) unsafe fn init(config: ClockConfig) {
 | 
				
			|||||||
    // Configure tick generator on the 2350
 | 
					    // Configure tick generator on the 2350
 | 
				
			||||||
    #[cfg(feature = "_rp235x")]
 | 
					    #[cfg(feature = "_rp235x")]
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        pac::TICKS.timer0_cycles().write(|w| w.0 = clk_ref_freq / 1_000_000);
 | 
					        let cycle_count = clk_ref_freq / 1_000_000;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        pac::TICKS.timer0_cycles().write(|w| w.0 = cycle_count);
 | 
				
			||||||
        pac::TICKS.timer0_ctrl().write(|w| w.set_enable(true));
 | 
					        pac::TICKS.timer0_ctrl().write(|w| w.set_enable(true));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        pac::TICKS.watchdog_cycles().write(|w| w.0 = cycle_count);
 | 
				
			||||||
 | 
					        pac::TICKS.watchdog_ctrl().write(|w| w.set_enable(true));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let (sys_src, sys_aux, clk_sys_freq) = {
 | 
					    let (sys_src, sys_aux, clk_sys_freq) = {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user