2018-04-12 06:36 AM
Hello,
lately I've been trying to connect my STM32f769I Evaluation board to Joystick.
I've read in user manual that Joystick is connected to MFX (Multi-Functinal eXpander) over I2C1. Also I've found adress of MFX which is 1000010 in schematic.
I have succesfully established connection over I2C1, but i don't know how to configure expander or what adress i should read/write if i want to find out which button on Joystick is pressed.
Can someon help me with this?Best regards,
Tomislav.
#mfx #i2c #multi-functional-expander #joystick #stm32f769i-eval2018-04-12 06:58 AM
Have you studied the documentation for the MFX ?
2018-04-12 07:34 AM
STM32Cube_FW_F7_V1.9.0\Drivers\BSP\STM32F769I_EVAL\stm32f769i_eval.c
With USE_IOEXPANDER defined check BSP_JOY_Init, etc. Support for I2C and MFX
2018-04-12 09:24 AM
MFX is acutally STM32L152CCT6, with that said, there is only documentation about uC
STM32L152CCT6
itself, but you can not access it, you can only communicate with it over i2c. Meaning - there is some code flashed on it and also some peripherals wired to it, but i cannot find any documentation about STM32L152CCT6 working as MFX on STM32F769I-Eval board and how to use it configured like that.There isn't a signle word about it in technical reference manual, and a few words about it here :
(6.19 Multi-Function expander - Page 29)
2018-04-12 09:46 AM
Thank you, it was what i was looking for.
Is there any documentation about GPIO adresses and registers of MFX?
For example if i'm using:void IOE_Write(uint8_t Addr, uint8_t Reg, uint8_t Value);
uint8_t IOE_Read(uint8_t Addr, uint8_t Reg);2018-04-12 10:49 AM
on a somewhat related note, i have working code for mcp23008 and mcp23017 if anyone wants it
2018-04-12 11:21 AM
The docs are pretty lacking, but the idea is much like other I2C IO Expanders. You get many GPIO pins you can configure as input/output, or IRQ sources. These tend to be low bandwidth things like buttons, SD Card Detect, LEDs etc. I think there are enough direct use case examples between the EVAL and DISCO boards, and the schematics, to gauge how it all fits together and works.