How to configure and use the STM32Cube SMBUS/PMBUS stack?
- May 7, 2020
- 6 replies
- 2731 views
Hello,
I'm using the STM32L475RC as a SMBUS/PMBUS Client and generated the Code with CubeMX.
As smbus/pmbus stack I use the X-CUBE-SMBUS Expansion Package (AN4502).
I've read and studied the examples that come with the package and tried to configure the
stack correctly. However, the stack does not work properly.
For testing the stack I use the tool pmbus_peek.
For example one problem is reading block data. Listing the device capabilities looks like
Inventory Data:
Manufacturer: 6Company Inc., based on our own Software, ST STM32L475
Model: ,Software for our hardware (pmbus, cortex-m4��v
Revision: w/20200504:1155, hw/our-h(pmbus, cortex-m4��v
Built at: 6Company Inc., based on our own Software, ST STM32L475
The original data in the code is
#define MFR_ID "Company Inc., based on our own Software, ST STM32L475R"
#define MFR_MODEL "Software for our hardware (pmbus, cortex-m4)"
#define MFR_REVISION "fw/20200504:1155, hw/our-hw"
It looks like the first byte always corresponds to the number of data bytes in the block, accordingly to the requirements in the smbus specification. Followed by the data bytes.
I think there is something misconfigured.
Does anybody have an idea?
In the appendix of this article you will find a small example that should illustrate the problem.
The example is created with CubeMX.
