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?
Off-hand I am not sure how to enable the P108/P300 DIO pins, I would guess there is a place to disable the debug function.
There would be the ability to program the device using SCI boot mode, assume that the P201/MD pin can be controlled to change into this mode, and that P109/P110 are available for the SCI interface.
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.