Hi all,
I want to use a timer pin to implement a bus protocol, i.e. measure edge times when receiving data and controlling edge times when sending.
0 and 1 are implemented by different high times.
Capturing the edge times when receiving is simple, I expect transmitting 0 and 1s is simply done by using timers with actions,
When transmitting, the pin needs to be open-drain.
When I configure the pin as a timer pin with Tivaware, it is set as a push pull pin
void
GPIOPinTypeTimer(uint32_t ui32Port, uint8_t ui8Pins)
{
//
// Check the arguments.
//
ASSERT(_GPIOBaseValid(ui32Port));
//
// Make the pin(s) be peripheral controlled.
//
GPIODirModeSet(ui32Port, ui8Pins, GPIO_DIR_MODE_HW);
//
// Set the pad(s) for standard push-pull operation.
//
GPIOPadConfigSet(ui32Port, ui8Pins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD);
}
Is it possible to have this as open drain by doing
GPIOPinTypeTimer(GPIO_PORTL_BASE, GPIO_PIN_6);
GPIOPadConfigSet(GPIO_PORTL_BASE, GPIO_PIN_6, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD)
?
Best regards,
Rainer