cancel
Showing results for 
Search instead for 
Did you mean: 

How to communicate with Joystick over MFX on STM32f769I-eval board?

Tom Kov
Associate II
Posted on April 12, 2018 at 15:36

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-eval
6 REPLIES 6
Posted on April 12, 2018 at 15:58

Have you studied the documentation for the MFX ?

Posted on April 12, 2018 at 16:34

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 12, 2018 at 16:24

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 : 

http://www.st.com/content/ccc/resource/technical/document/user_manual/group0/8e/5c/0f/b2/85/d5/43/1d/DM00276567/files/DM00276567.pdf/jcr:content/translations/en.DM00276567.pdf

 

(6.19 Multi-Function expander - Page 29)

Posted on April 12, 2018 at 16:46

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);
john doe
Lead
Posted on April 12, 2018 at 19:49

on a somewhat related note, i have working code for mcp23008 and mcp23017 if anyone wants it

Posted on April 12, 2018 at 18:21

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..