Skip to content

Commit cfc9a64

Browse files
author
Richard Unger
committed
fix bug #163
1 parent e021e5c commit cfc9a64

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

src/drivers/hardware_specific/samd/samd51_mcu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct wo_association WO_associations[] = {
9090
{ PORTA, 12, TC2_CH0, 0, TCC0_CH0, 6, TCC1_CH2, 2},
9191
{ PORTA, 13, TC2_CH1, 1, TCC0_CH1, 7, TCC1_CH3, 3},
9292
{ PORTA, 14, TC3_CH0, 0, TCC2_CH0, 0, TCC1_CH2, 2},
93-
{ PORTA, 15, TC3_CH1, 1, TCC1_CH1, 1, TCC1_CH3, 3},
93+
{ PORTA, 15, TC3_CH1, 1, TCC2_CH1, 1, TCC1_CH3, 3},
9494
{ PORTA, 16, TC2_CH0, 0, TCC1_CH0, 0, TCC0_CH4, 4},
9595
{ PORTA, 17, TC2_CH1, 1, TCC1_CH1, 1, TCC0_CH5, 5},
9696
{ PORTA, 18, TC3_CH0, 0, TCC1_CH2, 2, TCC0_CH0, 6},
@@ -124,7 +124,7 @@ struct wo_association WO_associations[] = {
124124
{ PORTB, 26, NOT_ON_TIMER, 0, TCC1_CH2, 2, NOT_ON_TIMER, 0},
125125
{ PORTB, 27, NOT_ON_TIMER, 0, TCC1_CH3, 3, NOT_ON_TIMER, 0},
126126
{ PORTB, 28, NOT_ON_TIMER, 0, TCC1_CH0, 4, NOT_ON_TIMER, 0},
127-
{ PORTB, 29, NOT_ON_TIMER, 1, TCC1_CH1, 5, NOT_ON_TIMER, 0},
127+
{ PORTB, 29, NOT_ON_TIMER, 0, TCC1_CH1, 5, NOT_ON_TIMER, 0},
128128
// PC24-PC28, PA27, RESET -> no TC/TCC peripherals
129129
{ PORTA, 30, TC6_CH0, 0, TCC2_CH0, 0, NOT_ON_TIMER, 0},
130130
{ PORTA, 31, TC6_CH1, 1, TCC2_CH1, 1, NOT_ON_TIMER, 0},

src/drivers/hardware_specific/samd/samd_mcu.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -808,11 +808,14 @@ void printAllPinInfos() {
808808
SimpleFOCDebug::print(" E=");
809809
if (association.tccE>=0) {
810810
int tcn = GetTCNumber(association.tccE);
811-
if (tcn>=TCC_INST_NUM)
811+
if (tcn>=TCC_INST_NUM){
812812
SimpleFOCDebug::print(" TC");
813-
else
813+
SimpleFOCDebug::print(tcn-TCC_INST_NUM);
814+
}
815+
else {
814816
SimpleFOCDebug::print("TCC");
815-
SimpleFOCDebug::print(tcn);
817+
SimpleFOCDebug::print(tcn);
818+
}
816819
SimpleFOCDebug::print("-");
817820
SimpleFOCDebug::print(GetTCChannelNumber(association.tccE));
818821
SimpleFOCDebug::print("[");
@@ -827,11 +830,14 @@ void printAllPinInfos() {
827830
SimpleFOCDebug::print(" F=");
828831
if (association.tccF>=0) {
829832
int tcn = GetTCNumber(association.tccF);
830-
if (tcn>=TCC_INST_NUM)
833+
if (tcn>=TCC_INST_NUM){
831834
SimpleFOCDebug::print(" TC");
832-
else
835+
SimpleFOCDebug::print(tcn-TCC_INST_NUM);
836+
}
837+
else {
833838
SimpleFOCDebug::print("TCC");
834-
SimpleFOCDebug::print(tcn);
839+
SimpleFOCDebug::print(tcn);
840+
}
835841
SimpleFOCDebug::print("-");
836842
SimpleFOCDebug::print(GetTCChannelNumber(association.tccF));
837843
SimpleFOCDebug::print("[");

0 commit comments

Comments
 (0)