Skip to main content
Associate III
August 12, 2024
Question

H747I-Disco expanding on an example file

hello forum

I've been playing with a H747I-Discovery board, and I want to add some more functionality to a combination of example codes - activating one of the i2c.
the example itself doesn't include an .IOC file.

As I see it I have two options:

1.Start a new project and and pull the example and continue from there
2. Manually activate the required periphery somehow inside the example

 

my problem with (1.) is that some of the example use the same leg (DCMI and SDMMC1 use PC)

and I'm not sure how to do (2.)

Is there a better approach? any tips for any of them?

This topic has been closed for replies.

9 replies

Tesla DeLorean
Guru
August 12, 2024

Most of the examples had been written by an engineer, thus not auto-generated via an IOC file.

There are perhaps other examples which were, or could be constructed from scratch.

You could also code the additional/incremental functionality manually. Or auto-gen to understand, and then merge in.

>>is that some of the example use the same leg (DCMI and SDMMC1 use PC)

Same pin? which conflicts.

Problem with DISCO/EVAL is often a kitchen sink approach and not particularly expandable, or different compromises need to be made.

Perhaps look at other boards, either minimal ones, or with the key features important to your needs/goals. Check AliExpress, TaoBao, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Associate III
August 13, 2024

TBH, I would like to "work more like an engineer" as well, what documents should I read? is there a way to learn the manual approach?

STTwo-32
ST Technical Moderator
August 12, 2024

Hello @ElectroManiac 

For the first solution you can't initialise the same pin to be used in two different alternate functions. So, you have to ensure that you dont have a pin conflict (CubeMX should do the job) you can for example use the SDMMC1 to data bus widths of 1-bit
mode that will need only 1 Data pin what may eliminate the conflict. So, you can restart the project from CubeMX, integrate your configuration and then your project code under CubeIDE. For the second methode, is not going to be easy since you have to configure the new API from scratch. That may take some time and need you to know how the API works exactly. You can also have the conflict problem here since you do not have a .ioc file that will warn you of any potential conflict.

Best Regards.

STTwo-32 

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.
Associate III
August 13, 2024

even if I use init/deinit when needed I can't setup the same leg? there's no way to do it manually?

STTwo-32
ST Technical Moderator
August 13, 2024

Sure, you can. you just have to set the pin for the alternate function you need and ensure it is set before using it on the new context.

Best Regards.

STTwo-32

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.