cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F072 PMBUS

loffan bertilsson
Associate II
Posted on January 21, 2017 at 14:10

Hi,

I have a STM32F072 in a board just like the Discovery F0.

trying to get PMBUS upp and running with an external DCDC module.

I can control it with waijung blockset in simulink sending i2c packets but now i need to get it working in a C environment.

I'm trying to get an example to work from the code below in System Workbench for STM32 IDE (Eclipse based)

http://www.st.com/en/embedded-software/x-cube-smbus.html

 

I have managed to import the files in a project so that it is now building, i can add some code blinking the led and I can debug it. But whatever I do I can not get any I2C communication started, the oscilloscope is just flat, nothing.

I have the correct pins connected and have tried every configuration in the readme file.

When debugging i see that the code is just looping in HAL: pcontext->Device->State == HAL_SMBUS_STATE_RESET or is just looping in a while loop because STACK_SMBUS_IsReady(pcontext) == 0

Can someone help me get the SMBUS/PMBUS HAL wotking on this MCU in System Workbench For STM32?

Or just point me in the right direction would be very helpful. Have struggled with this several weeks.

Best regards

Christoffer

1 REPLY 1
loffan bertilsson
Associate II
Posted on February 04, 2017 at 11:55

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6p1&d=%2Fa%2F0X0000000bwD%2FFtigZaGfdLCzM993FNAUltLFompFpCk1TiDChpkt5ac&asPdf=false