This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GPIO timing issue



Hello chris

I found another issue: when I use GPIO 29 to connect data line of temperature sensor 18B20 with single-bus architecture,found I can not setup timing sequence successfully.So I did a test,I only set GPIO29 high level at the beginning of interrupt,then I use oscilloscope to survey wave of GPIO29 in lab01.

setting about Hal.c

setting about lproj_lab01.c

At last, I found when execute the function "HAL_setGpioHigh(halHandle,GPIO_Number_29)"  the first time,GPIO29 will turn low level about 100ns. This issue make timing sequence chaotic.

  • Please configure the initial state before configuring it as an output. For example, if you want the initial state to be high, then:

      GPIO_setMode(obj->gpioHandle,GPIO_Number_29,GPIO_29_Mode_GeneralPurpose);
      GPIO_setHigh(obj->gpioHandle,GPIO_Number_29);
      GPIO_setDirection(obj->gpioHandle,GPIO_Number_29,GPIO_Direction_Output);

    -Jorge