Fez Stick number of uart's

Hi on the site it says the Fez stick has 3 uarts, but its not clear where the thrid is exposed. Based on the schamtic and module I can see UART5 & UART1 but thats it, cant see the third.

I get the note below saying about pin sharing and i can see uart 5 pins are shared with can & eth, but if only two are physically avalibale on the board i think the documentation needs to reflect that. Unless it is shared with other pins and i cant see it in the schematic or on the silk.


Hi thanks for the response, excuse me for my naivety, but i can see the flow control lines also for uart 5, and yes for uart 2, but i don’t see the rx/tx for uart 2?

Yes, you are right, there is no UART2,

we may update our doc. If you really need different UART port or more than 2 uart, beside 1 and 5 pins, I think Gpio LowLevel will help.

General Purpose Input Output (GPIO) (ghielectronics.com)

Thanks for the response, I needed to double check to make sure I was reading it all correctly. 2 is what I need but I also need to make use of the CAN bus so it means UART5 is unsuable for me.

Yes seems I will have to implement via the use of GPIO’s.

Is there any documentation on Settings object when using LowLevelController.TransferFeature?
The current documentation is light in descriptions.

Hi, from doc, all you need will be:

This example will move MOSI2 pin from PB2 to PC7, assuming AF6

// start by creating SPI2 to initialize the feature on PB2
// now transfer...
var settings = new Settings {​​​​​​​
    mode = PortMode.AlternateFunction,
    speed = OutputSpeed.VeryHigh,
    driveDirection = PullDirection.None,
    alternate = AlternateFunction.AF6,
    type  = OutputType.PushPull
LowLevelController.TransferFeature(SC20100.GpioPin.PB2, SC20100.GpioPin.PC7, settings);

That is it, we will correct other statements in this section.

Thats cool, just looking for clarity on the assumption of AF6, what is AF6 and if i transfer tx & tx of uart2 on the fez stick to two other pins that are avalible on the board does the example still apply. Sorry for any inconveniance.

Hello, AF6 mean alternate function 6. I just look at STM32H7 datasheet, you can use UART4 on pins PB8, PB9, using AF8


Or UART7, on pin PB3, PB4 using AF11

You need to find original pins on these ports that setup from firmware, and transfer to new pins.

Those PB3, PB4, PB8, PB9 are available on FEZ Stick.

1 Like

For your case:

Asuming you wanted PB3, PB4:

Firstly, you need initialize, SetActiveSettings() UART7 as usual, then

var settings = new Settings {​​​​​​​
    mode = PortMode.AlternateFunction,
    speed = OutputSpeed.VeryHigh,
    driveDirection = PullDirection.None,
    alternate = AlternateFunction.AF11,
    type  = OutputType.PushPull

// Transfer PE8 tx to PB4 tx, AF11 for UART7
LowLevelController.TransferFeature(SC20100.GpioPin.PE8, SC20100.GpioPin.PB4, settings );

// Transfer PE7 rx to PB4 rx, AF11 for UART7
LowLevelController.TransferFeature(SC20100.GpioPin.PE7, SC20100.GpioPin.PB3, settings );

You can transfer before or after called “Enable()”, but it has to be after SetActiveSeting(). This ‘SetActiveSeting()’ function will initialize original pins again.

If transfer after Enable() you may lost data because the port still use old pin till new pin updated, depends on how you setup your system.

Recommended is middle of SetActiveSeting() and Enable()



1 Like

Thanks now it makes sense, i didnt think to look at the data sheet as i assumed it was an internal defnition, very much appreciated :slight_smile:

1 Like

This information would be incredibly useful to add to the docs. A while ago I tried to get one of the can interfaces on a different set of pins so it wouldn’t collide with the ethernet PHY pins but couldn’t figure it out.

1 Like

I’d book mark this thread :slight_smile:

why this super power fully info is missing on doc
please provide more info on doc and an full example of it
(an marks all modules/board what have ability of AF)