Next: , Previous: , Up: The Controller   [Contents][Index]


2.2 Choosing the Interface Pins

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.

ConnectionPhysical PinRiot Pin Identifier
GNDX1,24-
RESETX2,3GPIO_PIN (0, 1)
BKGDX2,5GPIO_PIN (0, 0)

Figure 2.2: An example of the BDM connections at the micro-controller


Footnotes

(1)

For almost all controllers, all pins are bidirectional