Before starting, you should obtain the schematic circuit diagram for the controller you have chosen and the RIOT programming information for that board.
The BDM physical interface uses a single wire and dedicated electronics in the target system. It comprises three pins:
The GND pin is the ground connection. You must identify a ground pin on your controller. Next you need to choose two digital interface pins for the BKGD and RESET connections.
The BKGD connection is a bidirectional interface, so you must choose a pin on your controller which is capable of both output and high impedance input. The RESET connection communicates only in the direction host to target, so this pin needs to be only a digital output 1.
For each connection, you need to note two things, viz: the physical pin of the controller hardware, and the identifier macro used by RIOT to reference this pin. The RIOT identifier has the format ‘GPIO_PIN (port,pin)’. It is best if you note these down in a table like that shown in Figure 2.2.
For almost all controllers, all pins are bidirectional