2024-08-12 09:09 AM
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?
2024-08-12 11:09 AM
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.
2024-08-12 11:14 AM
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.
2024-08-13 03:47 AM
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?
2024-08-13 03:51 AM
even if I use init/deinit when needed I can't setup the same leg? there's no way to do it manually?
2024-08-13 04:54 AM
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.
2024-08-13 05:35 AM
How do I do that?
2024-08-13 06:03 AM
Example for SPI1_CLK and USART2_TX share the same pin (PC10 for example):
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.
2024-08-13 06:51 AM
first of all, I really appreciate the answer and the help.
I'm not sure about the "Set the Pin PC10 to USART2_TX" part,
I haven't found where and how I activate that stuff manually, and what setting and peripheries I need to activate with it.
If you can reference me to an example I can learn from/reading material it will be a great help
2024-08-13 07:13 AM
The best think I can recommend you is to generate both parts of the code using MX. Then, try to understand how it is configured. After that, repeat those configurations manually on your project. Unfortunately, there is no such example.
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.