トップ 差分 一覧 ソース 検索 ヘルプ PDF RSS ログイン

Kendryte K210

Kendryte K210

 Luckfox Pico

 LicheeRV Nano

MaixCAM

 Milk-V Duo 256M

 Milk-V Duo

ssh root@192.168.42.1
# mkswap /dev/mmcblk0p3
# swapon /dev/mmcblk0p3
# echo "/dev/mmcblk0p3 swap swap defaults 0 0" >> /etc/fstab

 M1s DOCK

 Kendryte K510

 Kendryte K230

userid:root,password:root
Failed to connect to bus: No such file or directory
apt install dbus

 MaixPy

最新はmaixpy_v0.6.2_84_g8fcd84a58 (2022-08-26)

最新はmaixpy_v0.6.2_85_g23d09fbcc (2023-06-05)

[MAIXPY] Pll0:freq:832000000
[MAIXPY] Pll1:freq:398666666
[MAIXPY] Pll2:freq:45066666
[MAIXPY] cpu:freq:416000000
[MAIXPY] kpu:freq:398666666
[MAIXPY] Flash:0xef:0x17
[MaixPy] gc heap=0x802ffd80-0x8037fd80(524288)
[MaixPy] init end

 __  __              _____  __   __  _____   __     __
|  \/  |     /\     |_   _| \ \ / / |  __ \  \ \   / /
| \  / |    /  \      | |    \ V /  | |__) |  \ \_/ /
| |\/| |   / /\ \     | |     > <   |  ___/    \   /
| |  | |  / ____ \   _| |_   / . \  | |         | |
|_|  |_| /_/    \_\ |_____| /_/ \_\ |_|         |_|

Official Site : https://www.sipeed.com
Wiki          : https://maixpy.sipeed.com

MicroPython v0.6.2-84-g8fcd84a58 on 2022-08-26; Sipeed_M1 with kendryte-k210
Type "help()" for more information.
>>>

 YOLO

 CanMV

 K210

 HuskyLens

 Maixduino

Network

Wi-Fi

Maixduinoではesp/ftplib.pyの方が良いようです。

from network_esp32 import wifi
SSID = "ESP_A28F1D"
PASW = ""

if wifi.isconnected() == False:
    for i in range(5):
        try:
            wifi.reset()
            print('try AT connect wifi...')
            wifi.connect(SSID, PASW)
            if wifi.isconnected():
                break
        except Exception as e:
            print(e)
print('network state:', wifi.isconnected(), wifi.ifconfig())

from ftplib import FTP
ftp = FTP('192.168.4.1')
ftp.login()
#ftp.cwd('/flash')
with open("data.csv", "rb") as f:
    ftp.storbinary("STOR /flash/data.csv", f)
ftp.close()

W5500

SPI

D SPI K210 Function(Hard) Function(Soft)
13 SCK IO3 fm.fpioa.SPI1_SCLK fm.fpioa.GPIOHS15
12 MISO IO10 fm.fpioa.SPI1_D1 fm.fpioa.GPIOHS14
11 MOSI IO11 fm.fpioa.SPI1_D0 fm.fpioa.GPIOHS13
10 SS IO12 fm.fpioa.GPIOHS10
import time, network
from machine import SPI
from Maix import GPIO
import socket, time
from fpioa_manager import fm
fm.register(12,fm.fpioa.GPIOHS10)#cs

ソフトウェアSPI

fm.register(11,fm.fpioa.GPIOHS13, force=True)#mosi
fm.register(10,fm.fpioa.GPIOHS14, force=True)#miso
fm.register(3,fm.fpioa.GPIOHS15, force=True)#sclk
WIZNET5K_SPI_SCK = 3
WIZNET5K_SPI_MOSI = 11
WIZNET5K_SPI_MISO = 10
WIZNET5K_SPI_CS = 12
spi1 = SPI(4, mode=SPI.MODE_MASTER, baudrate=600 * 1000,
            polarity=0, phase=0, bits=8, firstbit=SPI.MSB, sck=WIZNET5K_SPI_SCK, mosi=WIZNET5K_SPI_MOSI, miso = WIZNET5K_SPI_MISO)

# create wiznet5k nic
nic = network.WIZNET5K(spi = spi1, cs = WIZNET5K_SPI_CS)
print("Static IP: ", nic.ifconfig())
Static IP:  ('192.168.0.117', '255.255.255.0', '192.168.0.1', '8.8.8.8')
4 is the same as SPI.SPI_SOFT

固定IPの設定

#(ip, netmask, gateway, dns_server)
nic.ifconfig(('10.2.3.210', '255.255.255.0', '10.2.3.254', '10.2.1.1'))
print("Static IP: ", nic.ifconfig())
Static IP:  ('10.2.3.210', '255.255.255.0', '10.2.3.254', '10.2.1.1')

ハードウェアSPI

28, 26, 27, 29, SD_CS_PINはSDカードで使用している

The documentation isn't so clear on this side.
You have 4 hw SPI devices.
SPI2 can only work in slave mode, but I read somewhere. maybe in the documentation, that the slave mode isn't implemented.
SPI3 is reserved the the flash.
SPI0 is the lcd, I think and
SPI1 is the SD card, but also not sure. If I use SPI1 the SD card isn't available.
fm.unregister(28)
fm.unregister(26)
fm.unregister(27)
fm.register(11,fm.fpioa.SPI1_D0, force=True)#mosi
fm.register(10,fm.fpioa.SPI1_D1, force=True)#miso
fm.register(3,fm.fpioa.SPI1_SCLK, force=True)#sclk
spi1 = SPI(SPI.SPI1, mode=SPI.MODE_MASTER, baudrate=600 * 1000, polarity=0, phase=0, bits=8, firstbit=SPI.MSB)

 Sipeed Maix Bit

 SiPEED M1 dock

 M5StickV

 UnitV AI Camera

 KittenBot KOI Artificial Intelligence Module

 Sipeed MaixCube

 Sipeed Maix Amigo

 Yahboom K210 Visual Recognition Module

 K210 Developer Kit

 pyAI-K210

 CanMV-K210

 BPI-K210

 Linux on K210

 .NET

 NuttX

 TOPPERS


OAK-D

Rust

.NET

Tiny Go

WebAssembly

Java

AE2100