From 6f61646309300b8483feea93468bd504135c605f Mon Sep 17 00:00:00 2001 From: Mathias Rasmussen Date: Sun, 18 Apr 2021 04:17:42 +0200 Subject: [PATCH] docs: Update commutation comments --- Bluejay.asm | 114 ++++++++++++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/Bluejay.asm b/Bluejay.asm index 790bffc..de27272 100644 --- a/Bluejay.asm +++ b/Bluejay.asm @@ -2443,126 +2443,126 @@ wait_for_comm_wait: comm1_comm2: ; C->A jb Flag_Pgm_Dir_Rev, comm1_comm2_rev - clr IE_EA ; Disable all interrupts - B_Com_Fet_Off ; Turn off com fet - A_Com_Fet_On ; Turn on com fet - Set_Pwm_C ; To reapply power after a demag cut + clr IE_EA + B_Com_Fet_Off + A_Com_Fet_On + Set_Pwm_C ; Reapply power after a demag cut setb IE_EA - Set_Comp_Phase_B ; Set comparator phase + Set_Comp_Phase_B ret comm1_comm2_rev: ; A->C - clr IE_EA ; Disable all interrupts - B_Com_Fet_Off ; Turn off com fet - C_Com_Fet_On ; Turn on com fet (reverse) - Set_Pwm_A ; To reapply power after a demag cut + clr IE_EA + B_Com_Fet_Off + C_Com_Fet_On + Set_Pwm_A ; Reapply power after a demag cut setb IE_EA - Set_Comp_Phase_B ; Set comparator phase + Set_Comp_Phase_B ret ; Comm phase 2 to comm phase 3 comm2_comm3: ; B->A jb Flag_Pgm_Dir_Rev, comm2_comm3_rev - clr IE_EA ; Disable all interrupts - C_Pwm_Fet_Off ; Turn off pwm fet - Set_Pwm_B ; To reapply power after a demag cut - A_Com_Fet_On + clr IE_EA + C_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) + Set_Pwm_B + A_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) setb IE_EA - Set_Comp_Phase_C ; Set comparator phase + Set_Comp_Phase_C ret comm2_comm3_rev: ; B->C - clr IE_EA ; Disable all interrupts - A_Pwm_Fet_Off ; Turn off pwm fet (reverse) - Set_Pwm_B ; To reapply power after a demag cut - C_Com_Fet_On + clr IE_EA + A_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) + Set_Pwm_B + C_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) setb IE_EA - Set_Comp_Phase_A ; Set comparator phase (reverse) + Set_Comp_Phase_A ret ; Comm phase 3 to comm phase 4 comm3_comm4: ; B->C jb Flag_Pgm_Dir_Rev, comm3_comm4_rev - clr IE_EA ; Disable all interrupts - A_Com_Fet_Off ; Turn off com fet - C_Com_Fet_On ; Turn on com fet - Set_Pwm_B ; To reapply power after a demag cut + clr IE_EA + A_Com_Fet_Off + C_Com_Fet_On + Set_Pwm_B ; Reapply power after a demag cut setb IE_EA - Set_Comp_Phase_A ; Set comparator phase + Set_Comp_Phase_A ret comm3_comm4_rev: ; B->A - clr IE_EA ; Disable all interrupts - C_Com_Fet_Off ; Turn off com fet (reverse) - A_Com_Fet_On ; Turn on com fet (reverse) - Set_Pwm_B ; To reapply power after a demag cut + clr IE_EA + C_Com_Fet_Off + A_Com_Fet_On + Set_Pwm_B ; Reapply power after a demag cut setb IE_EA - Set_Comp_Phase_C ; Set comparator phase (reverse) + Set_Comp_Phase_C ret ; Comm phase 4 to comm phase 5 comm4_comm5: ; A->C jb Flag_Pgm_Dir_Rev, comm4_comm5_rev - clr IE_EA ; Disable all interrupts - B_Pwm_Fet_Off ; Turn off pwm fet - Set_Pwm_A ; To reapply power after a demag cut - C_Com_Fet_On + clr IE_EA + B_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) + Set_Pwm_A + C_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) setb IE_EA - Set_Comp_Phase_B ; Set comparator phase + Set_Comp_Phase_B ret comm4_comm5_rev: ; C->A - clr IE_EA ; Disable all interrupts - B_Pwm_Fet_Off ; Turn off pwm fet + clr IE_EA + B_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) Set_Pwm_C - A_Com_Fet_On ; To reapply power after a demag cut + A_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) setb IE_EA - Set_Comp_Phase_B ; Set comparator phase + Set_Comp_Phase_B ret ; Comm phase 5 to comm phase 6 comm5_comm6: ; A->B jb Flag_Pgm_Dir_Rev, comm5_comm6_rev - clr IE_EA ; Disable all interrupts - C_Com_Fet_Off ; Turn off com fet - B_Com_Fet_On ; Turn on com fet - Set_Pwm_A ; To reapply power after a demag cut + clr IE_EA + C_Com_Fet_Off + B_Com_Fet_On + Set_Pwm_A ; Reapply power after a demag cut setb IE_EA - Set_Comp_Phase_C ; Set comparator phase + Set_Comp_Phase_C ret comm5_comm6_rev: ; C->B - clr IE_EA ; Disable all interrupts - A_Com_Fet_Off ; Turn off com fet (reverse) - B_Com_Fet_On ; Turn on com fet - Set_Pwm_C ; To reapply power after a demag cut + clr IE_EA + A_Com_Fet_Off + B_Com_Fet_On + Set_Pwm_C ; Reapply power after a demag cut setb IE_EA - Set_Comp_Phase_A ; Set comparator phase (reverse) + Set_Comp_Phase_A ret ; Comm phase 6 to comm phase 1 comm6_comm1: ; C->B jb Flag_Pgm_Dir_Rev, comm6_comm1_rev - clr IE_EA ; Disable all interrupts - A_Pwm_Fet_Off ; Turn off pwm fet + clr IE_EA + A_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) Set_Pwm_C - B_Com_Fet_On ; To reapply power after a demag cut + B_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) setb IE_EA - Set_Comp_Phase_A ; Set comparator phase + Set_Comp_Phase_A ret comm6_comm1_rev: ; A->B - clr IE_EA ; Disable all interrupts - C_Pwm_Fet_Off ; Turn off pwm fet (reverse) + clr IE_EA + C_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) Set_Pwm_A - B_Com_Fet_On ; To reapply power after a demag cut + B_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) setb IE_EA - Set_Comp_Phase_C ; Set comparator phase (reverse) + Set_Comp_Phase_C ret