上手 Raspberry Pi Pico
什么是 PICO
Raspberry Pi Pico 是树莓派推出的一块基于 Arm Cortex-M0+ 内核的 MCU 的开发板,使用的 MCU 是树莓派自己研发的 Arm Cortex-M0+ 双核 RP2040。长这样子:
可以看到板子上外设非常少,可以说是 RP2040 的最小系统板,除了引出来的 IO,板子上有 USB、一个 BOOTSEL 按键、一个LED,一个用于存储固件的 Flash,然后就没有了。
先看看板子
上电,使用一根 micro USB 接口连上电脑:
上电后,看板子,一点反映都没有,灯没亮,看了下原理图,LED 是由 MCU IO 控制,不是直接接到电源,不是用作电源指示灯。有可能这板子没有控制 LED 的出厂程序,如果是这样的话,没反应也许就是最好的,不会冒烟、冒火花什么的,也不会有爆鸣声。
pico 在PC(win10)上
接下来,既然板子连接到了电脑,就看下电脑端吧,来,切换一下:
刚把板子插进电脑,什么都不做的话,如果是Win10 系统,可以看到电脑弹出如下:
点击下该对话框,打开的界面看到相关设备为:
驱动程序无法使用?什么情况? 吓得我赶紧打开设备管理器,看到一个应该是没安装成功驱动的设备:
不管先,我还看到了其他东西,一个大容量存储设备,通俗点就是 U 盘,如下:
里面的内容为:
打开 INFO_UF2.TXT 后看到内容为:
UF2 Bootloader v1.0
Model: Raspberry Pi RP2
Board-ID: RPI-RP2
如果用浏览器打开 INDEX.HTM 文件的话,会自动跳转到树莓派官网中的 rp2040/getting-started 页面:
既然是 USB 设备的话,我就想用 UVCView 软件看下该设备的 USB 相关信息:
我把用该软件看到的内容放到下面:
[Port2] : USB Composite Device
---===>Device Information<===---
English product name: "RP2 Boot"
ConnectionStatus:
Current Config Value: 0x01 -> Device Bus Speed: Full
Device Address: 0x13
Open Pipes: 4
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x03 -> Direction: OUT - EndpointID: 3
bmAttributes: 0x02 -> Bulk Transfer Type
wMaxPacketSize: 0x0040 = 0x40 bytes
bInterval: 0x00
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x84 -> Direction: IN - EndpointID: 4
bmAttributes: 0x02 -> Bulk Transfer Type
wMaxPacketSize: 0x0040 = 0x40 bytes
bInterval: 0x00
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1
bmAttributes: 0x02 -> Bulk Transfer Type
wMaxPacketSize: 0x0040 = 0x40 bytes
bInterval: 0x00
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x02 -> Direction: OUT - EndpointID: 2
bmAttributes: 0x02 -> Bulk Transfer Type
wMaxPacketSize: 0x0040 = 0x40 bytes
bInterval: 0x00
===>Device Descriptor<===
bLength: 0x12
bDescriptorType: 0x01
bcdUSB: 0x0110
bDeviceClass: 0x00 -> This is an Interface Class Defined Device
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x40 = (64) Bytes
idVendor: 0x2E8A = Vendor ID not listed with USB.org as of 03-19-2008
idProduct: 0x0003
bcdDevice: 0x0100
iManufacturer: 0x01
English (United States) "Raspberry Pi"
iProduct: 0x02
English (United States) "RP2 Boot"
iSerialNumber: 0x03
English (United States) "E0C912D24340"
bNumConfigurations: 0x01
===>Configuration Descriptor<===
bLength: 0x09
bDescriptorType: 0x02
wTotalLength: 0x0037 -> Validated
bNumInterfaces: 0x02
bConfigurationValue: 0x01
iConfiguration: 0x00
bmAttributes: 0x80 -> Bus Powered
MaxPower: 0xFA = 500 mA
===>Interface Descriptor<===
bLength: 0x09
bDescriptorType: 0x04
bInterfaceNumber: 0x00
bAlternateSetting: 0x00
bNumEndpoints: 0x02
bInterfaceClass: 0x08 -> This is a Mass Storage USB Device Interface Class
bInterfaceSubClass: 0x06
bInterfaceProtocol: 0x50
iInterface: 0x00
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1
bmAttributes: 0x02 -> Bulk Transfer Type
wMaxPacketSize: 0x0040 = 0x40 bytes
bInterval: 0x00
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x02 -> Direction: OUT - EndpointID: 2
bmAttributes: 0x02 -> Bulk Transfer Type
wMaxPacketSize: 0x0040 = 0x40 bytes
bInterval: 0x00
===>Interface Descriptor<===
bLength: 0x09
bDescriptorType: 0x04
bInterfaceNumber: 0x01
bAlternateSetting: 0x00
bNumEndpoints: 0x02
bInterfaceClass: 0xFF -> Vendor Specific Device
bInterfaceSubClass: 0x00
*!*CAUTION: This appears to be an invalid bInterfaceSubClass
bInterfaceProtocol: 0x00
iInterface: 0x00
*!*CAUTION: 0xFF is a prerelease Class ID
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x03 -> Direction: OUT - EndpointID: 3
bmAttributes: 0x02 -> Bulk Transfer Type
wMaxPacketSize: 0x0040 = 0x40 bytes
bInterval: 0x00
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x84 -> Direction: IN - EndpointID: 4
bmAttributes: 0x02 -> Bulk Transfer Type
wMaxPacketSize: 0x0040 = 0x40 bytes
bInterval: 0x00
这只能看到 pico usb 设备的配置信息,从上面信息可以看到这是个复合设备,有 2 个接口(bNumInterfaces: 0x02):
- Mass Storage USB Device Interface,大容量存储设备,也就 U盘
- Vendor Specific Device 自定义设备
这两个接口都有2个端点,都是 Bulk Transfer Type,正好对于上面看到的没安装成功驱动的设备跟 F 盘。
Hello World
从网络了解到的信息,可以通过拖拽烧录程序,也就是说把固件拖拽到 raspberry pico 生成的 U盘里就可以烧录程序了,来测试下,树莓派官方提供一个 raspberry pico 闪灯的例程,下载连接为:blink.uf2,官方描述为:
把固件下载下来,然后拷贝到 pico 生成的对 U盘里面,拷贝完成后,文件浏览器会自动关闭,pico 对应的 USB 设备都没有了,板子上的 LED 灯会闪烁了
后记
我尝试了下按住板子上的按键,然后再把板子插入电脑,出现的情况跟第一次上电一样,这也许,可能,pico 出厂的时候 Flash 是空的(没有 RP2040 能运行的固件的),pico 上的 flash 是空的的话,pico 就直接运行 boot 程序。
来,总结下,买到的 pico 是没有出厂测试程序的,给板子上电,板子看不到任何反映,直接进入了 boot。
上手 Raspberry Pi Pico的更多相关文章
- 在 raspberry pi pico 上体验 MicroPython
raspberry pi pico 官方提供 2 种开发方式,其中一种是使用 python3 开发,树莓派提供了 MicroPython 固件,把这个固件烧录进去,就可以 在 pico 上跑 pyth ...
- Raspberry Pi上手
2013-05-21 买的树莓派终于到手了,嘿嘿.我在官方代理ICKEY买的,是英国版,B型. 上手教程可以根据Getting Started with Raspberry Pi(网上有电子版免费下载 ...
- 2016 最新的 树莓派3 Raspberry Pi 3 上手评测 图解教程 新手必看!(VNC 安装,启动,关闭)
1.png . 官方教程: INSTALLING OPERATING SYSTEM IMAGES: https://www.raspberrypi.org/documentation/installa ...
- 树莓派(Raspberry Pi)上手小记
引言 本日志中有不少软广告,博主并没有收他们任何好处,完全是给想入手的小伙伴们指条路而已.不喜勿看,不喜勿闻,不喜勿喷. 介绍 之前两三个月突然听说了这么个东西,也没有留意,某天突然在一个微信公众号上 ...
- Raspberry Pi 学习笔记之一
记录几个搭建服务器教程: [教程] 将树莓派变成网络打印机服务器(更新PC和手机端设置)!http://www.eeboard.com/bbs/thread-8818-1-1.html[心得] [分享 ...
- 三大主流开源硬件对比:Arduino vs BeagleBone vs Raspberry Pi
个人总结: Arduino就是个AVR单片机,个人觉得更适合玩电子的,社区也很活跃. BeagleBone是ARM Cortex-A8,属于嵌入式,价格高于Pi,但是许多方面拥有超越 Pi 的优 势, ...
- (0)开始 Raspberry Pi 项目前需要知道的 10 件事
https://www.digikey.cn/zh/articles/techzone/2017/feb/10-things-to-know-before-starting-a-raspberry-p ...
- 让Mono 4在Raspberry Pi上飞
最近公司有项目想要在树莓派上做,代替原来的工控机(我们是把工控主机当作小的主机用,一台小的工控主机最少也要600左右,而树莓派只要200多).于是,公司买了一个Raspberry Pi B+和一个Ra ...
- Kali v2.1.2 for Raspberry Pi 3B
最新的下载地址是: https://www.offensive-security.com/kali-linux-arm-images/ 按照官网的说法是找不到树莓派版本的SHA1SUM和SHA1SUM ...
随机推荐
- [c++] 细节
\r退格:printf("asdflkj\r111")输出111flkj(https://blog.csdn.net/tyshtang/article/details/436770 ...
- ar是System Activity Reporter(系统活动情况报告)的缩写。这
ar是System Activity Reporter(系统活动情况报告)的缩写.这个工具所需要的负载很小,也是目前linux中最为全面的性能分析工具之一.此款工具将对系统当前的状态就行取样,然后通过 ...
- 最简单的方法是使用标准的 Linux GUI 程序之一: i-nex 收集硬件信息,并且类似于 Windows 下流行的 CPU-Z 的显示。 HardInfo 显示硬件具体信息,甚至包括一组八个的流行的性能基准程序,你可以用它们评估你的系统性能。 KInfoCenter 和 Lshw 也能够显示硬件的详细信息,并且可以从许多软件仓库中获取。
最简单的方法是使用标准的 Linux GUI 程序之一: i-nex 收集硬件信息,并且类似于 Windows 下流行的 CPU-Z 的显示. HardInfo 显示硬件具体信息,甚至包括一组八个的流 ...
- mysql基础之忘掉密码解决办法及恢复root最高权限办法
如果忘记了mysql的root用户的密码,可以使用如下的方法,重置root密码. 方法一: 1.停止当前mysql进程 systemctl stop mariadb 2.mysql进程停止后,使用如下 ...
- STM32独立看门狗(IWDG)
造成程序跑飞,只是程序的正常运行状态被打断而进入死循环,从而使单片机控制的系统无法正常工作.看门狗就是一种专门用于检测单片机程序运行状态的硬件结构. STM32内部自带了两个看门狗,独立看门狗(IWD ...
- 11.13 ethtool:查询网卡参数
ethtool命令用于查询或设置网卡参数. ethtool [devname] [root@linuxprobe ~]# ethtool eth0 Settings for eth0: Suppor ...
- fprintf函数
描述 C 库函数 int fprintf(FILE *stream, const char *format, ...) 发送格式化输出到流 stream 中. 声明 下面是 fprintf() 函数的 ...
- @JSONField与@DateTimeFormat 注解(Day_21)
@JSONField的常用参数说明 @JSONField(ordinal = 1) //指定json序列化的顺序 @JSONField(serialize = false) //json序列 ...
- 代码动态更换MeshRenderer的材质Materials
public class metrailstest : MonoBehaviour { Material[] m; Material i; public Material[] n; int index ...
- Crontab 的使用方法
第1列分钟1-59第2列小时1-23(0表示子夜)第3列日1-31第4列月1-12第5列星期0-6(0表示星期天)第6列要运行的命令 下面是crontab的格式:分 时 日 月 星期 要运行的命令 这 ...