AnsweredAssumed Answered

STM32F072 PMBUS

Question asked by loffan bertilsson on Jan 21, 2017
Latest reply on Feb 4, 2017 by loffan bertilsson

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)

X-CUBE-SMBUS - STM32Cube SMBus/PMBus embedded software (AN4502) - STMicroelectronics - STMicroelectronics 

 

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

Outcomes