Skip to content

Commit

Permalink
fix: Disable interrupts when changing clock speed
Browse files Browse the repository at this point in the history
Avoid minor timing inconsistency
  • Loading branch information
mathiasvr committed Oct 13, 2021
1 parent 58afd1f commit c9ed003
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Bluejay.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3908,7 +3908,6 @@ motor_start:
mov Pwm_Limit_Beg, @Temp2 ; Set initial pwm limit
mov Pwm_Limit, Pwm_Limit_Beg
mov Pwm_Limit_By_Rpm, Pwm_Limit_Beg
setb IE_EA ; Enable interrupts

; Begin startup sequence
IF MCU_48MHZ == 1
Expand All @@ -3931,6 +3930,7 @@ IF MCU_48MHZ == 1

mov DShot_GCR_Start_Delay, #DSHOT_TLM_START_DELAY_48
ENDIF
setb IE_EA ; Enable interrupts

mov C, Flag_Pgm_Dir_Rev ; Read spin direction setting
mov Flag_Motor_Dir_Rev, C
Expand Down

0 comments on commit c9ed003

Please # to comment.