Skip to content

Portenta H7: MBed Serial port compatability? #70

@KurtE

Description

@KurtE

Simple question about how compatible should the two platforms be?

On MBED, I believe it has 3 Serial ports defined:
From pins_arduino.h we have:

#define SERIAL_HOWMANY		3
#define SERIAL1_TX			(digitalPinToPinName(PIN_SERIAL_TX))
#define SERIAL1_RX			(digitalPinToPinName(PIN_SERIAL_RX))

#define SERIAL2_TX			PA_15
#define SERIAL2_RX			PF_6
#define SERIAL2_RTS			PF_8
#define SERIAL2_CTS			PF_9

#define SERIAL3_TX			(PJ_8)
#define SERIAL3_RX			(PJ_9)

Serial1: PA_9 and PA10: are on USART1 on schematics LPUART
Serial2: Is on UART7 - Not on High density connector, Used for WiFi and BT
Serial3: is on UART8

So Two of the UART/USARTs are on the connector.

Image

With the current ArduinoCore-zephyr/zephyr device tree we have
serials = <&cdc_acm_uart0>,<&usart6>, <&usart1>, <&uart4>;
Serial1 is USART6:

&usart6 {
	pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>;
	pinctrl-names = "default";
	current-speed = <115200>;
};

Which is on the HD connector, but not exposed with MBED?

Serial2 is: USART1:

&usart1 {
	pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
	pinctrl-names = "default";
	current-speed = <115200>;
};
 

On MBED this is Serial1

And Serial3 is: UART4

/* UART0 in datasheet */
&uart4 {
	pinctrl-0 = <&uart4_tx_pa0 &uart4_rx_pi9>;
	pinctrl-names = "default";
	current-speed = <115200>;
};

Which is not setup as SerailX on MBED.
And on MBED UART8 is not exposed in zephyr.

Question is: Should we resolve the differences? If so how. Could for example add all of them? that either defined?
What order? Something like: USART1, UART7, USART8, USART6, UART4.
Or should UART7 go to the end as not exposed externally and not used on H7 lite.

Wish that the RX/TX buffers would be dynamic... Only allocated if the port is actually used... But that is a different subject.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions