I am wondering if I can use the CTS or RTS of one of the telemetry serial (1 or 2) as a GPIO
My goal is to use this GPIO as an interrupt that will be triggered from the companion computer, to synchronize the companion computer to Ardupilot clock (the companion computer knows when the trigger is set as it its the source, a custom Ardupilot library will take a timestamp on the trigger, and insert the timestamp in a custom Mavlink message)
I have looked at the uC datasheet, and it looks possible HW wise
page 1003, chapter 30.3.14 Hardware flow control, it says :
“RTS and CTS flow control can be enabled independently by writing respectively RTSE and CTSE bits to 1 (in the USART_CR3 register).”
Then I looked at Ardupilot HW define files, particularly :
There are :
“PA12:USART1_RTS” : 7,
“PA1:USART2_RTS” : 7,
Then I grep for the use of attach_interrupt, and I found
What I do not get, is what should I use as a pin number in the AP_HAL::GPIO class (in my very case ChibiOS::GPIO) ?
Can I use PA12 or PA1 with AltFunction_map ? In conjunction with DMA_Map ?