Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


How do I use "User Constants" for "Parameter Settings"?

I read (well, skimmed) the “manual” and I thought I understand:
I create a “User Constant”, give it a value, and then I can use the name of the constant instead of a parameter on the “Parameter Settings” tab.
I tried it for timers “Counter Period” and it didn’t work; it kept reverting to zero after saving.

If I’m doing it the wrong way, how am I supposed to use this?
I was hoping I can get a variable (even if called constant) that I can change in user code to change timer period (for example).

If my expectation is wrong... what are the User COnstants good for?

Thanks,

Cat

France

Hi Cat,
I think you refer to ST’s CubeMX software, not to System Workbench for STM32.
Anyway I just check and there seems to be a problem with these, as they seem to be lost when saving a project, restarting CubeMX then reloading th eproject... I will forward this to ST team and they will look at it. I will keep you informed of any news on this.
Bernard

Yes, the Cube, thank you. I am very glad they work together so I forgot they are in fact very separate things :-)

Hi Cat,

Please check the 2 points below:

1- Constant value: Be sure that the value of your constant is valid for the given parameter. Because in case of a non-valid value, the constant can’t be accepted.

2- Constant name: maybe this is related to the constant name. There is already a known issue when the constant contains an “E”. This issue will be also fixed in the next release STM32CubeMX v4.11 planned for e/o w42.

If not, could you please provide the generated .ioc and the defined constant to be able to reproduce the problem?

Hi Bernard, the encountred issue when saving the project is already fixed in the V4.10.0.
Could you please, provide your .ioc?

Thanks and Best regards,
Amel.


Thank you,
It’s likely my constant name did contain “E”s (or “e” if it’s the same) as it’s only the most common letter...
I’ll check it again in 4.11, when it comes.

But: was my usage correct? Is it OK to use the User Constants as Variables in Workbench User Code (once they work)?

Thanks and best,

Cat


Yes, it should be ok to use your constant as Variable in your user code, because it will be defined in the Inc/mxconstants.h file.

Regards,
Amel.

Thank you Amel,
This allowed me to see that even though I couldn’t use it as a parameter value, the constant I defined was indeed saved to “mxconstants.h”:

  1. define DDS_IOUPDT_LENGTH 1000

However, since it’s defined as a #define I think it can’t really be a variable :-(

Best,
Cat


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs