2025-03-27 4:47 AM - edited 2025-03-27 4:52 AM
We are using this the X-CUBE-SMBUS middleware for a simple SMBus like device, and noticed that the generated configuration file sets the wrong define for the "Condensed command table" setting.
The generated config file sets the DENSE_CMD_TABLE define, but the library expects DENSE_CMD_TBL
X-CUBE-SMBUS/2.1.0/STM32CubeMX/templates/stm32_config_stack_h.ftl:
[#if SMB_densetable_value == "1"]
#define DENSE_CMD_TABLE
[/#if
should read
[#if SMB_densetable_value == "1"]
#define DENSE_CMD_TBL
[/#if
The error is noticeable if the PMBUS version is set to 1.1 or 1.2. Setting PMBUS version to 1.3 (default) hides the error as DENSE_CMD_TBL is a required feature for PMBUS 1.3 and is automatically enabled regardless of what the CubeMX config says.
In our case we are using the library for a minimal SMBus like device, not using any PMBus features. So PMBUS feature level is set to 1.1 and most features are disabled.