Nucleo-64 3.3V rail problem. - Page 1
Forum section: electronics / general

author: paulca
author_rank: Super Contributor
timestamp: September 28, 2022, 09:38:54 am
content: Hi,I got my first STM32, a Nucleo-64 dev board with the attached STLink programmer/debugger. It all works fine.First project (after hello world), I read a TMP102 and printed the results to UART. ( an integrated serial console in the IDE would be nice!)Fine.Then I added a library for the SSD1306 OLED, added code to print the temp value to the screen.Ran it and it failed with a programmer error. The programmer error basically repeats the same useless error saying that it had an error, but not what it was. A bit of digging revealed an actual error, target not responding, the programmer was unable to reset the chip.Odd. So I removed the SSD1306 OLED, leaving the i2C code for it in place, at least it will test error handling. It worked. My blinky heartbeat was still flashing the LED a 1hz so the main loop was running.I connected only ground, it worked. I connected the 3.3V rail to the SSD1306 and the chip will not longer accept communications with the programmer. The OLED doesn't work either, even with the SCL/SDA connected.It would seem as though the 3.3V rail can't power the chip + TMP102 + SSD1306 128x64 mono OLED.I checked the datasheets and manuals and it continues to state that 500mA is what you should expect from a correctly enumerated USB connection. (The driver is installed and windows recognises it, so I expect it will get the full 500mA). The 3,3V LDO is rated for at least 500mA.So either my USB port is only giving it the minimum allowed 100mA and that's not enough (which is possible under such as powering on the OLED).... or the LDO circuit on the board id flawed.I know, I'm breaking the rules, but I ran out of time before I could put a meter on it. It's either a load issue or a noise issue. If the OLED is too noisey or bounces the power rail too much... I don't know.Note, the OLED still works, I attached it to an ESP32 and it works fine.Also, the code doesn't work, as when I got the thing to boot by powering the oLED from 5V (naughty!) it booted the programmer worked, but the OLED was blank. At least it didn't crash the programmer interface though.Thoughts?

author: dietert1
author_rank: Super Contributor
timestamp: September 28, 2022, 09:50:50 am
content: Recently i had a similar problem and the culprit was a bad USB cable (of unknown origin ,,). With another cable it worked as expected.Regards, Dieter

author: paulca
author_rank: Super Contributor
timestamp: September 28, 2022, 10:01:22 am
content: Quote from: dietert1 on September 28, 2022, 09:50:50 amAh, yes. I have a plague of them. Cheap leads which only have +/- and not D1,D2. Cheap leads that only have 2 strands of wire and break when you look at them funny.I did notice that "wiggling" the usb port slightly causes disconnects and, I did have programmer upload errors at one point and reseating the USB plugs fix it. So it could well be a dodgy lead or a dodgy USB port! It's S/H machine that I have had in a cupboard for 3 years.I'll fix that, the simple things first and if it still fails I stick a scope on the 3.3V line and see what's happening to the voltage.