IO pins on custom expansion board
-
Hello,
I'm creating a custom expansion board with IO and PWM pins only. In order for it to work I need to add a new config file for the firmware. Do I have to change anything else except the pin table?
So for example, if I'd like to add an IO number 9, I change this:// TC TCC ADC SERCOM in SERCOM out Exint PinName // Port A { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, nullptr }, // PA00 driver2 DIR
to this:
// TC TCC ADC SERCOM in SERCOM out Exint PinName // Port A { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, 9, io9.out }, // PA00
And I'm done, right?
-
That should be sufficient to create a new output pin without PWM capability.
-
@dc42 Thank you!
Could you explain what should I do to add a PWM capable pin?
I'm making a new board based on the 1LC setup. -
To add a PWM enabled output you need to pick a pin that the datasheet shows can be connected to a TC[n].WO[m] pin for some n and m, with the following constraints:
- the TC or TCC must not already be used for another PWM output
- if it is a TC then m cannot be zero
- if it is a TC then it must not be one of the pair of TCs used for step pulse generation
After picking the pin, put the appropriate entry in the TC or TCC column of that row of the pin table. See the existing entries for e.g. pin out0 as examples.