Portenta Machine Edition Pin Naming Convention

Hello, I am writing code for the Portenta Machine Edition product. What I can't seem to find is a simple reference to all of the PINS and how I would address them programmatically.

For example looking at the first image from the latest pinout PDF on the site.

For the top row there are clear names. So I am assuming I can reference "RS485 TX P" or "TP1" or "AI0". Can anyone verify the naming convention or is there a table that has this?

The bottom row is confusing as it repeats. How do I differentiate in code Digital Input 00 from Digital Output 00 or Programmable Digital I/O 00?

Is there a tool or header file that defines these?

Say, you want to write to Digital output pin #2

Unfortunately, the pinout diagram is no use here, but if you check the schematics or the library you will notice the following array containing the corresponding Portenta H7 pin names:

mbed::DigitalOut out[8] = {
		mbed::DigitalOut(PI_6), mbed::DigitalOut(PH_9), mbed::DigitalOut(PJ_9), mbed::DigitalOut(PE_2),
		mbed::DigitalOut(PI_3), mbed::DigitalOut(PI_2), mbed::DigitalOut(PD_3), mbed::DigitalOut(PA_14)
	};

Digital output pin #2 corresponds to "PJ_9". Now that you know the name of the pin, you can use it and pass it to any library function like so:

Instead of
libraryFunction(2);

use
libraryFunction(PinNameToIndex(PJ_9));

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.