2019-02-04 02:52 AM
USE_SD_TRANSCEIVER is set to 1U by default when generating code for STM32H743. But I need it to be 0. I have to manually edit the "stm32h7xx_hal_conf.h" file every time after generating code and reset the flag to 0, which is annoying! I checked almost every setup page but I could not find where to set this flag.
I use current version 5.0.1 of STM32CubeMX.
Thank you for any hint!
2019-02-04 04:52 AM
Hi,
If you create a file called ".extSettings" in the same directory of your "xxxxx.ioc" file, you can give CubeMX additional instructions (there is a whole section about it in the user guide, although I wish the documentation was a bit more comprehensive ... lol)
Add something like this in there ....
[Others]
Define = USE_SD_TRANSCEIVER
HALModule = <name of the module, so that library files can be added to your project>
2019-02-04 05:24 AM
Thank you for the information!
I checked the manual and tried this, but it doesn't work. It seems that the Define items simply do something like this:
#define USE_SD_TRANSCEIVER
but I need to give it a value:
#define USE_SD_TRANSCEIVER 0
So the problem is not yet solved. But thanks anyway, it was worth a try.
2019-02-04 07:32 AM
Hmmm ... I see what you mean. It would be nice if that stm32h7xx_hal_conf.h file had a couple of USER_CODE sections in it, like the other files generated by CubeMX.
2019-02-05 07:25 AM
Hi @GS@S
Following the analysis of your ticket I regret to inform you that CubeMX does not support the parameter USE_SD_TRANSCEIVER is not configurable but you can overcome your problem through the code generated by CubeMX.
On the other hand you said that you have change the USE_SD_TRANSCEIVER in the file stm32h7xx_hal_conf.h and it's the right configuration, just change the line
#define USE_SD_TRANSCEIVER 1U => #define USE_SD_TRANSCEIVER 0U
and it will work absolutely.
I will always be at your service at all times
Best Regards,
Wael
2019-02-05 10:08 AM
Hi Wael,
thats correct. I can change the setting to 0U manually. However, this manual change has to be done every time after "Generate code" is pressed.
As we are still on the development side of the board and configurations are not finally selected for all peripherals, "Generate Code" will for sure be necessary in the near future several times. I now have to take care that I don't forget to reset this manual configuration every time I generate code again.
In case Cube would not touch my re-definition, this would be ok, but it automatically generates the define with 1U every time when code is generated. Thats the point.
Best regards
Gaby
2019-02-11 12:53 AM
Hi @GS@S
With manual configuration you can overcome your problem
Maybe it will be solved in future versions of the CubeMX.
Best Regards,
Wael