Skip to content

A print bug when bebugging the function void printAllPinInfos() in "samd_mcu.cpp" @v2.2.1 #163

@ren-y-n

Description

@ren-y-n

Firstly, thank a lot for the great work for SAMD MCU.

Now lets turn to the issue in "samd_mcu.cpp".
if (tcn >= TCC_INST_NUM),for example tcn = 5,TCC_INST_NUM = 3.
then SIMPLEFOC_SAMD_DEBUG_SERIAL.print(tcn) get the flowing message:
...
Pin 00 PA16 E= TC5-0[0] F=TCC1-0[0] G=TCC 0-4[4]
Pin 01 PA17 E= TC5-1[1] F=TCC1-1[1] G=TCC 0-5[5]
...
But PA16 has not TC5 arrcording to the SMAD51 chip datasheet, so SIMPLEFOC_SAMD_DEBUG_SERIAL.print(tcn%TCC_INST_NUM ) is a bit improvement.

BTW, the other 2 suggestions for“samd51_mcu.cpp”:
struct wo_association WO_associations[] = {
...
// {PORTA, 15, TC3_CH1, 1, TCC1_CH1, 1, TCC1_CH3, 3},
{PORTA, 15, TC3_CH1, 1, TCC2_CH1, 1, TCC1_CH3, 3},
...
// {PORTB, 29, NOT_ON_TIMER, 1, TCC1_CH1, 5, NOT_ON_TIMER, 0},
{PORTB, 29, NOT_ON_TIMER, 0, TCC1_CH1, 5, NOT_ON_TIMER, 0},
}

Finally, thank again for the great efforts.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions