Added VCC-GND YD-RP2040 boards.#2874
Added VCC-GND YD-RP2040 boards.#2874NormanDunbar wants to merge 6 commits intoraspberrypi:developfrom
Conversation
Added three new VCC-GND YD-RP2040 boards to cover the 4M, 8M and 16M flash sizes.
The three board files have been amended to resolve queries raised by the code reviewer "lurch" on the original pull request.
|
Afternoon Lurch. I have made the requested changes and pushed them to my repo. See Commit 10333de above for details. Thanks for your comments, much appreciated. Cheers, |
All three files now have the same name for the button attached to GPIO-24 as this is the only button and the Flash size has no meaning for the pin name.
|
Hi Lurch, I did a test with that define containing hyphens. You were correct, I learned something today! Cheers, |
I misread the comment on the PR and didn't rename the button pins as requested. Fixed now. Apologies.
|
Oh Hum! Apologies. I misread your request to rename the button pin and leaft the "0" in the name. Fixed in 4b23e92. Cheers, |
| // The GPIO Pin used to monitor VSYS. Typically you would use this with ADC. | ||
| // There is an example in adc/read_vsys in pico-examples. | ||
| #ifndef PICO_VSYS_PIN | ||
| #define PICO_VSYS_PIN 29 |
There was a problem hiding this comment.
The pinout diagram at the bottom of https://makerselectronics.com/product/yd-rp2040-vcc-gnd-studio-microcontroller-board/ shows that GP29 is connected to one of the edge-holes, which makes me suspect that it isn't "used to monitor VSYS"?
There was a problem hiding this comment.
Morning Lurch.
Yes, it appears from the pinout that GPIO-29 is connected to ADC3 which is the one for VSYS monitoring. So, I ran up the "read_vsys" example on a Pico and it noticed when I switched to battery power. This board always thinks it's on battery (and the voltage & temperature is off too. I'm in the North of Scotland, but it's not that cold!)
Power BATTERY, 9.89V (574%), temp -1479.8 DegC
It's a bit weird this board to be honest.
-
There's no
ADC_VREFon the edge connector, there's an extra hole beside the3v3 Outpin (physical pin 36) and a link markedvrefjust about therunpin. Shorting the link connectsADC_VREFto the3v3 Outand, this makes the ADC work! -
The RGB LED is on GPIO-23 but only if the link above the reset button is shorted otherwise GPIO-23 goes to physical pin 37, which is
3v3_enon the Pico. -
The three SWD pins are mixed up compared to the Pico and there's a spare 3v3 pin there just to complicate things.
-
I've read also, that in USB Host mode, there's no power to any peripherals!
Anyway, all that aside, and give the test results, I've once again fixed the files. Commit 1701790 is the latest.
Cheers,
Norm.
|
Hi Norm,
Was that the result from before you added the link between
Yes, the ADC needs a "reference voltage" to compare the sampled-voltage to (and the temperature is also read using the ADC). I've not tested myself, but I suspect that if
Hmm, if the RGB LED isn't functional unless you add this link, that should probably be mentioned in a comment above your
Neither of those things affect the board-header file that you're adding here 😉 Did you miss my earlier comment about |
The VBUS pin has been removed. (GPIO-24 as was) as the boiard doesn't monitor VSYS. Comments have been added regarding the RGB LED as some boards need a link soldering to enable the RGB LED. Other boards do not.
|
Afternoon Lurch,
Yes, there was no link between the So, it's definitely not able to monitor VSYS. Interesting that the voltage is now reported as 0.00V whereas before the header was added, it was 9.89V. Weird. Pressing the USR button attached to GPIO-24 makes no difference regardless of how the board is powered.
I have added a comment to that effect. However, it appears that some boards don't have the link. The pinout I have from the manufacturer, vcc-gnd.com, shows the link but other boards (eg Gary Explains on You Tube) didn't need the link soldering to make RGB work.
Apologies, yes I missed it. I have now removed the VBUS definition from the files. The USR button is the only mention of GPIO-24 now. Latest commit is d76b0a2. Once again, I really appreciate the time you have taken to talk me through this stuff. Thank you. Cheers, |
Thank you for making all the changes I suggested! I'm happy to approve this now 👍 |
|
Well, we finally got there! Thanks again. Cheers, |
Added three new VCC-GND YD-RP2040 boards to cover the 4M, 8M and 16M flash sizes.
Fixes #2873.
I have added three new board files:
vcc_gnd_yd-rp2040_4m.hfor the 4M flash variant.vcc_gnd_yd-rp2040_8m.hfor the 8M flash variant.vcc_gnd_yd-rp2040_16m.hfor the 16M flash variant.There is an RGB LED on GPIO-23.
There is a user button on GPIO-24.
The 3v3_EN pin on the Pico, is apparently not implemented. Physical pin is GPIO-23.
ADC_VREF is not brought out to physical pin 35 unless a link is soldered. Without the link, it's GPIO-29/ADC3.
The RGB LED is not usable unless a link is soldered. GPIO-23 is a normal GPIO pin without the link.
The chip on these boards appears to be the B2 release of the RP2040. (PICO_RP2040_B2_SUPPORTED is defined.)
These are my first attempts at board definitions, please be gentle!
Thanks.