some GPIO dont work on the 144 pin STM32L476 ZG

01 Feb 2017

Hello,

We designed our own board based on a STM32L476ZG micro which has 144 pin.

We are used to work on mbed, especially on NXP and ST board and we want to make our board comatible with mbed.

To do so we cloned mbed-os and created a new folder in mbed-os/targets/TARGET_STM/TARGET_STM32L4/Our_board in which we copy pasted the files of TARGET_L476_L486 corresponding to the L476 implementation. /media/uploads/peyo/arborescence_mbed.png

Its works well and we can compile, flash and debug programs on our board. But the L476 port on mbed is only the 64 pin version of the MCU. Our MCU has 144 pin so we had to define new pins and ports (especially G port) to be able to use them. Here comes a really strange issue : when we try to use GPIO of G port in any mode (Digital, I2C ...) the MCU registers corresponding to the GPIOG are well modified, the clock registers are also indicating that GPIO G clock is activated but nothing is happening on the pin.. we cant have any output nor get any input on GPIO G pins.

What do we missed ? Its not a hardware issue cause GPIO G is working well with STM32CUBE L4 drivers.

To add the missing port and pins on mbed we modified the following files (see screenshot) : PinNames.h for pins definitions PortNames.h for port definitions PeripheralPins.c pinmap.c for clock definitions

/media/uploads/peyo/pinnames.h /media/uploads/peyo/portnames.h /media/uploads/peyo/pinmap.c