nimaltd / ds18b20

ds18b20 library for stm32 hal
GNU General Public License v3.0
141 stars 43 forks source link

Does not work in other IDE (cannot find device) #2

Closed leech001 closed 1 year ago

leech001 commented 5 years ago

Hey. I tried your example and everything works fine! However, if you try to repeat it with the same settings in the STM32CubeIDE environment (https://www.st.com/en/development-tools/stm32cubeide.html) or another similar IDE Clion everything stops working. Just can't find a device according to the debug. Tell me what is wrong with the library and why it is so sensitive to changing the IDE. For an example of an error attached the project in STM32CubeIDE with identical settings.

Test_ds.zip

nimaltd commented 5 years ago

I dont test in another ide.  I think your optimizer in size.  Try woth optimize speedOn May 5, 2019 9:17 AM, Bulanov Konstantin notifications@github.com wrote:Hey. I tried your example and everything works fine! However, if you try to repeat it with the same settings in the STM32CubeIDE environment (https://www.st.com/en/development-tools/stm32cubeide.html) or another similar IDE Clion everything stops working. Just can't find a device according to the debug. Tell me what is wrong with the library and why it is so sensitive to changing the IDE. For an example of an error attached the project in STM32CubeIDE with identical settings. Test_ds.zip

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

njuFerret commented 3 years ago

same problem with stm32cubeide, no idea about finding device.

njuFerret commented 3 years ago

same problem with stm32cubeide, no idea about finding device.

finally, I managed to fix the problem: due to the following functions not work :

void ONEWIRE_INPUT(OneWire_t *gp);

rewrite these functions as :

// PG7 as GPIO pin
void ONEWIRE_INPUT(OneWire_t *gp) {
  gp->GPIOx->CRL&=0X0FFFFFFF;
  gp->GPIOx->CRL|=8<<28;
}
// no needed, just for like previous function
void ONEWIRE_OUTPUT(OneWire_t *gp) {
  gp->GPIOx->CRL&=0X0FFFFFFF;
  gp->GPIOx->CRL|=3<<28;
}

device now work OK on STM32CubeIDE ver 1.6.1 with STM32F103ZE mcu.