Build-A-Burger
Full Member level 1
I have another processor card with 3v3 output I've put on the same 3v3 converter and I get a clean 5vdc out the other end. I'm using STM32CubeMX to generate the code and I set the pins to output & GPIO_PULLUP. I've tried changing them to GPIO_NOPULL, GPIO_PULLDOWN too. I also measured the output on both a meter and scope without being connected to the 3v3 converter and its a clean signal. There is nothing on the output of the coverter when I'm doing this. Here's the standard code to configure the pins generated by CubeMX:
If you want to see the rest of the code (there's a lot) I can put it up on github.
- - - Updated - - -
I now have the entire project up on github.com:
https://github.com/sunbelt56/DiscoveryVL3
- - - Updated - - -
I've tried taking the wire loose from the converter and measuring the voltage and it's always either 0 or 2.79 volts. Is this enough to drive a 3v3 converter? Could the output not have enough current? I've also tried a 4k7 pulldown resistor.
-------------------------------------------------------
- - - Updated - - -
OK - never mind. I lied when I said it was generated by CubeMX. I had copied it to a separate function and from the above code, it should be obvious what I did wrong.
- - - Updated - - -
Here's the correct code, FYI:
Code C# - [expand] 1 2 3 4 5 6 7 GPIO_InitTypeDef GPIO_InitStruct = {0}; HAL_GPIO_WritePin(GPIOB, DS1620_PIN_DQ | DS1620_PIN_CLK | DS1620_PIN_RST, GPIO_PIN_RESET); GPIO_InitStruct.Pin = DS1620_PIN_DQ | DS1620_PIN_CLK | DS1620_PIN_RST; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_PULLUP; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
If you want to see the rest of the code (there's a lot) I can put it up on github.
- - - Updated - - -
I now have the entire project up on github.com:
https://github.com/sunbelt56/DiscoveryVL3
- - - Updated - - -
I've tried taking the wire loose from the converter and measuring the voltage and it's always either 0 or 2.79 volts. Is this enough to drive a 3v3 converter? Could the output not have enough current? I've also tried a 4k7 pulldown resistor.
-------------------------------------------------------
- - - Updated - - -
OK - never mind. I lied when I said it was generated by CubeMX. I had copied it to a separate function and from the above code, it should be obvious what I did wrong.
- - - Updated - - -
Here's the correct code, FYI:
Code C# - [expand] 1 2 3 4 5 6 7 8 9 GPIO_InitTypeDef GPIO_InitStruct = {0}; HAL_GPIO_WritePin(GPIOB, DS1620_PIN_DQ | DS1620_PIN_CLK | DS1620_PIN_RST, GPIO_PIN_RESET); GPIO_InitStruct.Pin = DS1620_PIN_DQ | DS1620_PIN_CLK | DS1620_PIN_RST; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Mode = GPIO_PULLUP; // GPIO_InitStruct.Pull = GPIO_NOPULL; // GPIO_InitStruct.Pull = GPIO_PULLDOWN; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
Last edited by a moderator: