AnsweredAssumed Answered

Stm32f030f4 and ds2401 ID chip onewire communication

Question asked by ohayo.John on Jan 17, 2017
Latest reply on Feb 2, 2017 by Clive One

Hello everyone,

I started new project that consist of ds2401 and stm32f030f4.I use Cubemx and hal drivers for this project.

Basically ı just would like to use onewire communication to read data from this ID chip.Therefore I tried to add TM drivers from this webside and this library is used for stm32f4 series.I just wanted to migrate it for f0 series but unfortunately ı was not able to add this libraries.

Is there anyway to make them work in my microcontroller.

 

Here is an example for onewire connection and the libarary is available below of this page : Library 12- OneWire library for STM32F4 - STM32F4 Discovery 

 

here is my projectview

 

On the left side I added TM drivers , But after build I get following errors;

../Drivers/STM32F0xx_HAL_Driver/Inc/tm_stm32_delay.h(185): error: #20: identifier "DWT" is undefined
uint32_t start = DWT->CYCCNT;
..\Drivers\STM32F0xx_HAL_Driver\Src\tm_stm32_delay.c(47): error: #20: identifier "CoreDebug" is undefined
CoreDebug->DEMCR &= ~0x01000000;
..\Drivers\STM32F0xx_HAL_Driver\Src\tm_stm32_delay.c(51): error: #20: identifier "DWT" is undefined

Outcomes