Skip to main content
Tom Kov
Associate
April 12, 2018
Question

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

  • April 12, 2018
  • 6 replies
  • 2028 views
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
This topic has been closed for replies.

6 replies

Andrew Neil
Super User
April 12, 2018
Posted on April 12, 2018 at 15:58

Have you studied the documentation for the MFX ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Tom Kov
Tom KovAuthor
Associate
April 12, 2018
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)

Tesla DeLorean
Guru
April 12, 2018
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
April 12, 2018
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tom Kov
Tom KovAuthor
Associate
April 12, 2018
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
Senior III
April 12, 2018
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