cancel
Showing results for 
Search instead for 
Did you mean: 

Toggle led controlled by MFX_v3?

Lsy.1
Associate II

I am using STM32L496 discovery board and I want to toggle LD1 which is controlled by MFX_GPIO4 on MFX_v3 chip according to UM2160. I'd like to do this within STM32CubeIDE, but I am not clear how to manage the MFX expansion device properly. Is it possible to generate these MFX setup code in Cube software? Also, is there any details on MFX_v3 registers and functions?

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

MFX_V3 is a port expander, which is connected via I2C to the STM32L496. For the control of periphery, which is behind the MFX_V3 from the view of the STM32L496, the software from the BSP (see the repository on Github or local) can be used.

For accessing the signal LED2 (a bit confusing it leads to the hardware LED named LD1) an enum is defined in the header file, so you can access it with LED_ORANGE.

There are also examples in the DISCO repository (just search for LED_ORANGE), how it can be used. To use the BSP, normally only the header file in main.h has to be included: 

#include "stm32l496g_discovery.h"

Good luck!

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Peter BENSCH
ST Employee

MFX_V3 is a port expander, which is connected via I2C to the STM32L496. For the control of periphery, which is behind the MFX_V3 from the view of the STM32L496, the software from the BSP (see the repository on Github or local) can be used.

For accessing the signal LED2 (a bit confusing it leads to the hardware LED named LD1) an enum is defined in the header file, so you can access it with LED_ORANGE.

There are also examples in the DISCO repository (just search for LED_ORANGE), how it can be used. To use the BSP, normally only the header file in main.h has to be included: 

#include "stm32l496g_discovery.h"

Good luck!

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.