I'm working on a custom board powered by an R7FA2E2A32DNK. I need to use both SWDIO and SWCLK pins (on P108 and P300, respectively) as simple digital inputs.
On the FSP configurator interface I am unable to select the relevant option - the mode dropdown is stuck on "Peripheral" - because they are connected to the Debug/SWD function.
How can I set and use them as inputs? I am obviously prepared to give up debugging, but I'm wondering how I would program the device without the SWD interface enabled. Is it possible?
Hello,
You can prevent pins P300 and P108 from functioning as debug pins by selecting Disabled operation mode:
Then you can change them as input/output GPIOs.
As JimB mentioned, the device can also be programmed using the programming interface of UART channel 9 without the use of SWD interface pins. The easiest way to program this way is to use Renesas Flash Programmer.
You would need control over MD pin to enter boot mode and a USB-to-UART converter connected between your PC and SCI9 pins.
Thank you. I knew about the possibility to disable the debug function, but it was not clear to me how to program the device afterwards.
Confusingly, even after disabling the SWD interface it's still possible to program the processor with my JLink while now also being able to read the two GPIOs. Since everything works I'm not complaining.