File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ uint32_t z_clock_elapsed(void)
291291	/* gives the value of LPTIM1 counter (ms) 
292292	 * since the previous 'announce' 
293293	 */ 
294- 	uint64_t  ret  =  (lp_time  *  CONFIG_SYS_CLOCK_TICKS_PER_SEC ) / LPTIM_CLOCK ;
294+ 	uint64_t  ret  =  (( uint64_t ) lp_time  *  CONFIG_SYS_CLOCK_TICKS_PER_SEC ) / LPTIM_CLOCK ;
295295
296296	return  (uint32_t )(ret );
297297}
@@ -315,7 +315,7 @@ uint32_t z_timer_cycle_get_32(void)
315315	lp_time  +=  accumulated_lptim_cnt ;
316316
317317	/* convert lptim count in a nb of hw cycles with precision */ 
318- 	uint64_t  ret  =  lp_time  *  ( sys_clock_hw_cycles_per_sec () / LPTIM_CLOCK ) ;
318+ 	uint64_t  ret  =  (( uint64_t ) lp_time  *  sys_clock_hw_cycles_per_sec ())  / LPTIM_CLOCK ;
319319
320320	k_spin_unlock (& lock , key );
321321
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments