cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use CubeMX constants/parameters within CubeMX itself?

RAltm
Senior

Hello,

I wonder if it's possible to use the CubeMX user parameters or generated constants within CubeMX itself.

For example, the FMC configuration allows to calculate the origin and size of a given memory, let's say SDRAM. The LTDC configuration needs the address of the frame buffer(s). Now, it would be great if the FMC values can be used within the LTDC configuration to set the frame buffer to e.g. the beginning of the SDRAM.

If it's not possible to use the values directly, can it be achieved by user constants? For example, defining a user constant in FMC which uses/collects the generated FMC values, and passing the user constant to the LTDC configuration?

This would enable having some kind of automatic configuration between multiple peripherals - you only have to set the corresponding symbols instead of absolute values which might change between projects.

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
Khouloud ZEMMELI
ST Employee

Hello @RAltm​ ,

Thanks for your post,

Actually, it's possible to create user constants for both FMC and LTDC by assigning for each constant a value (as mentioned in the image below), then they will be generated in your project.

You can manipulate these constants later according to your need in the code, but there's no option in CubeMX that connect user constant to other IPs.

0693W00000ALzj4QAD.png 

Hope my answer helped you :) if your question was answered, please close this topic by choose Select as best, this will help other users find the answer faster.

Thanks for your contribution, Khouloud

View solution in original post

2 REPLIES 2
Khouloud ZEMMELI
ST Employee

Hello @RAltm​ ,

Thanks for your post,

Actually, it's possible to create user constants for both FMC and LTDC by assigning for each constant a value (as mentioned in the image below), then they will be generated in your project.

You can manipulate these constants later according to your need in the code, but there's no option in CubeMX that connect user constant to other IPs.

0693W00000ALzj4QAD.png 

Hope my answer helped you :) if your question was answered, please close this topic by choose Select as best, this will help other users find the answer faster.

Thanks for your contribution, Khouloud

RAltm
Senior

Hello Khouloud,

thank you for explanation. So, it seems it's not possible to even use the configuration values within the constants. Maybe you want to discuss this with the CubeMX team.

Regards