cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE Pin Configuration/HAL Issues

repairman
Associate II

I am working with the STM32F769NI evaluation kit. As expected, it comes with many more peripherals that one may need for a specific project. I have two projects which I am trying to combine together into one, both of which have separate pin configurations/ioc. They were generated from the STM32CubeIDE examples for CAN data and FatFS. When we try to merge these two projects together, we get errors from the HAL and also from pin configuration, as some pins seem to be reserved for other things and unable to be assigned, and we are not sure if our assignments are correct. They work independently however. How does one determine which specific pins need to be assigned for their peripherals and where, and more, what pin modifications are required for everything to integrate properly? We are relatively inexperienced and think we must be missing some simpler method for integrating these two projects and generating the proper pin assignments in the GUI and resolving mysterious HAL errors, which we presume is due to certain code note being generated from the config. Thanks!

5 REPLIES 5
TDK
Guru

There's not really a magic solution. Try to assign pins as you think appropriate and work through the errors as they come up. Hovering over an error or warning in CubeMX will give you an explanation.

Merging two projects is a manual step. Need to create a new IOC file, assign pins, and integrate user code as necessary.

If you feel a post has answered your question, please click "Accept as Solution".
repairman
Associate II

@TDK thanks. For the IOC configuration, are there any resources to explain how to setup pin configurations when creating a project using multiple peripherals? It seems certain pins can only be assigned for certain peripherals, so knowing which pins can and need to be set for SDMMC while also allowing us to set other pins for CAN without conflict would be really helpful. At the moment, we just click on pins in the configurator and see what that pin is allowed to be assigned to, but we also don't know if we have done all the required pin assignments for a particular peripheral.

Thanks. For the IOC configuration, are there any resources to explain how to setup pin configurations when creating a project using multiple peripherals? It seems certain pins can only be assigned for certain peripherals, so knowing which pins can and need to be set for SDMMC while also allowing us to set other pins for CAN without conflict would be really helpful. At the moment, we just click on pins in the configurator and see what that pin is allowed to be assigned to, but we also don't know if we have done all the required pin assignments for a particular peripheral.

TDK
Guru

CubeMX will shift pins around to accommodate your selection. However, you can do this manually if you want. The datasheet lists the options for the various pins.

The CubeMX doesn't show an error, all pins have been set. Feel free to manually verify.

If you feel a post has answered your question, please click "Accept as Solution".
Piranha
Chief II

> At the moment, we just click on pins in the configurator and see what that pin is allowed to be assigned to

Even if you don't use code generation, enable and configure the peripheral so that it enables the respective pins. Then, by holding Ctrl+Click on a pin, one can also view the available alternative pins for that signal line, if there are such.