Some digitalin digitalout pins not working on Nuvoton M453

I am using a custom board as the NuMaker PFM-M453 is not available for purchase. I’ve double checked the schematic and don’t think I’ve made any mistakes, although I am using an IC with fewer pins, the M453LG6AE.

Some example code I’ve tried in Mbed studio and with the online complier.

#include "mbed.h"
DigitalIn sw1 (PD_2);
DigitalOut ledR(PC_1);
DigitalOut test(PE_10);
int main()
    test = 1; 
    while(1) {
        ledR = sw1;

I am not getting output from PE_10. I’ve tried PE_10 & PE_11 as inputs and outputs. Output is always at zero volts and inputs read 0 even when voltage is applied.
PC_1 and PD_2 both work properly as do all the other PC and PD pins that I’ve tried.

I don’t know if it makes any difference, but I am not sure the the PE10 & PE11 pins are connected to anything. Is it possible they just aren’t configured for mbed? I don’t get a fault or complier error though.

I’ve also tried this, but get 0 for both values even when voltage is applied.

#include "mbed.h"
DigitalIn toggle_a(PE_11);
DigitalIn toggle_b(PE_10);
int main() {
  while (true) {
    fprintf(pc, "%d ",;
    fprintf(pc, "%d \n",;

I thought I’d leave this here in the off chance anyone finds it useful in the future.

The Numaker PFM-M453 has a 100 pin M453VG6AE on board.
I am using the M453LG6AE with 48 pins.
I expected this to work like when I’ve used STM ICs with fewer pins than the development board counterpart.

As far as I can tell both MCUs have the same memory map and registers.
In fact, if you are using Keil or some other IDE the support files are the same for the entire M451 family. (this includes the M453.)
The generated code from from Nuvoton’s pin configuration tool is the same for each both ICs so long as you don’t configure pins that aren’t available.
I went deep into the datasheet and the M451series.h file and the only exceptions I’ve found are for devices with less memory or if pins simply aren’t available.

PE_10, 11, 12 & 13 are on the GPE_MFPH register. I’ve tried using these pins with with mbed’s DigitalIn, DigitalOut, I2C, BufferedSearial and the pins remain floating, disconnected and otherwise not functional.

I also tried using these pins with nuvoton’s macros which works on all the other registers, but not GPE_MFPH.

I’m not certain if the documentation is wrong or if I’m just missing something. I emailed Nuvoton and will post here if they offer any more insight.


I do not know if that will help you but did you check the sources and did you tried to change something?

BR, Jan

I did see the note about lines being commented out in the PeripheralPins file, but I didn’t see any of the GPIO lines commented out. (maybe I’m missing something, digging deep down in the mbed files isn’t something I do often.)

You are right that the pins are defined. I do not get a compiler error. The pins just don’t do anything.

I did recently find a NuMaker PFM M453 board. Some of the pins not used in the Arduino header are broken out in a header in the middle of the board. I tested PE_10 and PE_11 and they do work as expected with mbed.

Ignoring the pinmap, even when using the nuvoton macros the pins still don’t work on the M453LG6AE. I assumed this would work like using an STM microcontroller with fewer pins. For the most part it has worked, it’s just this one module that does not.

There is an option to disable GPIO in/out for entire modules, which seems mostly commonly used for the ADC pins to keep stray voltages from creating inaccuracies. But it begs the question, why would it work on the larger IC, but not on the smaller IC.

I’ve tried using Nuvoton’s Eclipse IDE to see if it generates any different code for the smaller IC, but I don’t really know how to use Eclipse.