Skip to content

Add some definition files for waveshare board. #9085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EngineerWill
Copy link

Add some Waveshare board descriptions,like:

  1. RP2040-Zero
  2. RP2040-Plus
  3. RP2040-LCD-0.96

@robert-hh
Copy link
Contributor

Two files not related to the new RP2040 boards sneaked into that commit. These are from a different already merged PR. So please remove them from your PR.

@EngineerWill
Copy link
Author

Two files not related to the new RP2040 boards sneaked into that commit. These are from a different already merged PR. So please remove them from your PR.
Okay, let me google how do I remove them from my PR. Wait a minute

@Flipje1955
Copy link

I try to understand the situation wrt Waveshare Zero (have a couple of them). This board is mentioned in this ticket as well as in #10314 and #9321. Yet, there is no download option for Waveshare boards on the download page which may be related to the status OPEN.
May I kindly ask if that is still an intention( as the ticket has not seen any (visible) attention since some time).
Thx !

@EngineerWill
Copy link
Author

Although I don't quite understand, for some reason, it hasn't been merged yet, so I've been waiting.

I try to understand the situation wrt Waveshare Zero (have a couple of them). This board is mentioned in this ticket as well as in #10314 and #9321. Yet, there is no download option for Waveshare boards on the download page which may be related to the status OPEN. May I kindly ask if that is still an intention( as the ticket has not seen any (visible) attention since some time). Thx !

@Flipje1955
Copy link

Thank you for your quick response. As you appear to be the driving force behind this pull request, will you then try to break the "waiting for some unknown" situation ?
(You carry "engineer" in your name; for me an engineer is typically interested in why things work or why they don't).

@EngineerWill
Copy link
Author

Maybe MicroPython doesn't consider this pull request to be important, as it doesn't concern fixing any critical bugs or urgent issues. It appears that MicroPython merges pull requests in a sequential manner, and other reasons for non-merging might need to be addressed by MicroPython management.

I am an embedded engineer and this is my profession.I like it.so I call myself EngineerWill.

Thank you for your quick response. As you appear to be the driving force behind this pull request, will you then try to break the "waiting for some unknown" situation ? (You carry "engineer" in your name; for me an engineer is typically interested in why things work or why they don't).

@TheChymera
Copy link

TheChymera commented Jun 1, 2023

This would be really great, I've had issues getting the waveshare RP2040-Zero boards to work since none of the firmware from the micropython website seem to work.

Took me a while to find working firmware (I initially thought the boards were just broken), from the manufacturer website, which, however, seems pretty outdated and also needs unzipping for some reason https://www.waveshare.com/w/upload/b/b4/Rp2-pico-w-20230219-unstable-v1.19.1.uf2.zip

Is there perhaps already something from the micropython website I can use? Closest I found was https://micropython.org/download/rp2-pico-w//resources/firmware/rp2-pico-w-20230426-v1.20.0.uf2 , which fails with:

GPIO test

GPIO connet to GND :  16 ,

GPIO connet to VCC :

GPIO connet to GPIO :

GPIO not connet : 0,9,10,11,12,13,14,15,26,


ADC test

GPIO28=0.53 V
GPIO28 adc Error!!!!!!
GPIO29=0.56 V
GPIO29 adc Error!!!!!!

@Flipje1955
Copy link

Am puzzled by what you report on your experience with MP on Waveshare Zero. I am using the regular Pico firmware on the Waveshare board (now using: MicroPython v1.20.0-24-g867e4dd3d on 2023-04-27; Raspberry Pi Pico with RP2040) and that works (however, GPIO29 does not and I have not troubled to solder connections at the bottom-side as I can run my project with the pins availabe on the top side). So I cannot state I know for sure everything works.
You reference firmware for the Pico_W; as far as I know there is no Waveshare rp2040 with WIFI. Or is there ?

@EngineerWill
Copy link
Author

EngineerWill commented Jun 2, 2023

Hello, according to the log you provided, it seems that you provided the RP2040-Zero factory program which is only used to test the RP2040-Zero hardware and needs to be used with the corresponding testing tool.

However, based on your description, it seems that you were unable to successfully flash the mpy firmware. Please note that RP2040-Zero is compatible with pico firmware, and you can obtain the corresponding firmware file on the Raspberry Pi official website.
Pico mpy firmware

This would be really great, I've had issues getting the waveshare RP2040-Zero boards to work since none of the firmware from the micropython website seem to work.

Took me a while to find working firmware (I initially thought the boards were just broken), from the manufacturer website, which, however, seems pretty outdated and also needs unzipping for some reason https://www.waveshare.com/w/upload/b/b4/Rp2-pico-w-20230219-unstable-v1.19.1.uf2.zip

Is there perhaps already something from the micropython website I can use? Closest I found was https://micropython.org/download/rp2-pico-w//resources/firmware/rp2-pico-w-20230426-v1.20.0.uf2 , which fails with:

GPIO test

GPIO connet to GND :  16 ,

GPIO connet to VCC :

GPIO connet to GPIO :

GPIO not connet : 0,9,10,11,12,13,14,15,26,


ADC test

GPIO28=0.53 V
GPIO28 adc Error!!!!!!
GPIO29=0.56 V
GPIO29 adc Error!!!!!!

@jimmo jimmo added the board-definition New or updated board definition files. Combine with a port- label. label Oct 9, 2023
@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.37%. Comparing base (5b4a2ba) to head (dac54d9).
Report is 558 commits behind head on master.

❗ Current head dac54d9 differs from pull request most recent head 3946cf5. Consider uploading reports for the commit 3946cf5 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9085      +/-   ##
==========================================
- Coverage   98.39%   98.37%   -0.03%     
==========================================
  Files         158      156       -2     
  Lines       20965    20424     -541     
==========================================
- Hits        20629    20092     -537     
+ Misses        336      332       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EngineerWill EngineerWill force-pushed the Waveshare_Board branch 2 times, most recently from 19b0858 to 0de9fa0 Compare October 17, 2023 10:20
// url : https://www.waveshare.com/product/rp2040-lcd-0.96.htm
// wiki : https://www.waveshare.com/wiki/RP2040-LCD-0.96
// Board and hardware specific configuration
#define MICROPY_HW_BOARD_NAME "Waveshar RP2040-LCD-0.96"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in waveshare?

"USB-C"
],
"images": [
"rp2040-lcd-0.96-1.jpg"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this image is not provided in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Board images are intended to be submitted as a separate PR on the micropython-media repo, they're not included in this main repo to keep the size down.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image is provided in this PR(micropython/micropython-media#62)

"rp2040-plus-1.jpg"
],
"mcu": "rp2040",
"product": "Waveshare RP2040=Plus",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in product name?

// url : https://www.waveshare.com/product/rp2040-plus.htm
// wiki : https://www.waveshare.com/wiki/RP2040-Plus
// Board and hardware specific configuration
#define MICROPY_HW_BOARD_NAME "Waveshar RP2040-Plus"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in waveshare again?

#define MICROPY_HW_USB_VID (0x2E8A)
#define MICROPY_HW_USB_PID (0x1020)

// user led gpio25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this go in a pins.csv? there's no point in just having a dangling comment

// url : https://www.waveshare.com/product/rp2040-plus.htm
// wiki : https://www.waveshare.com/wiki/RP2040-Plus
// Board and hardware specific configuration
#define MICROPY_HW_BOARD_NAME "Waveshar RP2040-Plus"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same typo again

#define MICROPY_HW_USB_VID (0x2E8A)
#define MICROPY_HW_USB_PID (0x1020)

// user led gpio25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment on dangling comment vs pins.csv

// url : https://www.waveshare.com/product/rp2040-zero.htm
// wiki : http://www.waveshare.com/wiki/RP2040-Zero
// Board and hardware specific configuration
#define MICROPY_HW_BOARD_NAME "Waveshar RP2040-Zero"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same...

@EngineerWill EngineerWill force-pushed the Waveshare_Board branch 2 times, most recently from 56d4194 to 20f3bb6 Compare October 26, 2023 04:03
Signed-off-by: EngWill <646689853@qq.com>
@mungewell
Copy link
Contributor

Some recent discussions with WaveShare support pointed me at this merge request, is there a reason it has not been done?

My (mis-)adventures with changing the XTALs on board for more precision parts will required a custom build, should the XTAL freq change. I have proved this on Ri-P boards, but the WaveShare boards are tempting me with a good price and include variant with an on-board LCD.

@mungewell
Copy link
Contributor

@karlp @EngineerWill

Ping. Is there a reason this PR is not yet implemented?

@EngineerWill
Copy link
Author

@karlp @EngineerWill

Ping. Is there a reason this PR is not yet implemented?

I don’t know why this PR hasn’t been processed yet

@andrewleech
Copy link
Contributor

andrewleech commented Apr 1, 2024

Actually, the two "plus" boards should now be implemented as two variants on the one board profile. To be fair the variant system didn't exist when you first put this merge request together.

An example of variant definitions can be seen in https://github.com/micropython/micropython/pull/12281/files

@EngineerWill
Copy link
Author

Actually, the two "plus" boards should now be implemented as two variants on the one board profile. To be fair the variant system didn't exist when you first put this merge request together.

An example of variant definitions can be seen in https://github.com/micropython/micropython/pull/12281/files

I referred to the definition of ports/rp2/boards/PIMORONI_PICOLIPO_16MB and ports/rp2/boards/PIMORONI_PICOLIPO_4MB at that time

Do I need to modify it? If it needs to be modified, can you provide a reference case, because I think other rp2040 boards still have this problem.(like 'PIMORONI_PICOLIPO')

@andrewleech
Copy link
Contributor

Ah interesting, yeah that board is an apt comparison. I'm not sure how the maintainers feel about the variants as a must, I thought existing cases like the pimoroni ones had been "cleaned up" already.

Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board-definition New or updated board definition files. Combine with a port- label. port-rp2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants