cancel
Showing results for 
Search instead for 
Did you mean: 

MFX

Rizwan Syed
Associate II
Posted on March 09, 2017 at 11:54

Hi 

I am working on STM32F769i-Eval board.

What is mfx initialization?

When i see camera example i found the below code

/**

* @brief Initializes and configures the IO functionalities and configures all

* necessary hardware resources (MFX, ...).

* @note BSP_IO_Init() is using HAL_Delay() function to ensure that MFXSTM32L152

* IO Expander is correctly reset. HAL_Delay() function provides accurate

* delay (in milliseconds) based on variable incremented in SysTick ISR.

* This implies that if BSP_IO_Init() is called from a peripheral ISR process,

* then the SysTick interrupt must have higher priority (numerically lower)

* than the peripheral interrupt. Otherwise the caller ISR process will be blocked.

* @retval IO_OK if all initializations are OK. Other value if error.

*/

uint8_t BSP_IO_Init(void)

{

uint8_t ret = IO_OK;

if (IoDrv == NULL) /* Checks if MFX initialization never done */

{

/* Read ID and verify the MFX is ready */

mfxstm32l152Identifier = mfxstm32l152_io_drv.ReadID(IO_I2C_ADDRESS);

if((mfxstm32l152Identifier == MFXSTM32L152_ID_1) || (mfxstm32l152Identifier == MFXSTM32L152_ID_2))

{

/* Initialize the IO driver structure */

IoDrv = &mfxstm32l152_io_drv;

/* Initialize MFX */

IoDrv->Init(IO_I2C_ADDRESS);

IoDrv->Start(IO_I2C_ADDRESS, IO_PIN_ALL);

}

else

{

ret = IO_ERROR;

}

}

else

{

/* MFX initialization already done : do nothing */

}

return ret;

}

Can anyone tells what initialization is mfx?

Thanks and Regards

Rizwan Syed

1 REPLY 1
Posted on March 09, 2017 at 12:08

MFX stands for Multi Function eXpander and is a slave mcu, U22 STM32L152CCT6, see Ch. 6.19  and Fig.40 in UM2035.

It functions mainly as an IO expander on that board, controlled from main mcu through I2C.

On other STM32 evaluation borads (mainly DISCOs), there's also such slave 'L15x marked as MFX but mainly for current measurement.

JW