0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

micropythonでshrike-lite その45

0
Last updated at Posted at 2026-10-07

概要

micropythonでshrike-lite、やってみた。
micropythonで、fpgaのuart_txを読む。

通信仕様

BaudRate : 115200
Parity : None
DataBits : 8
StopBits : One
Handshake : None
電圧レベル:3.3v

手順

i/o plannerでtxをGPIO4にする。

bitstreamをコンパイル、usbにコピー

main.pyを編集する。


from machine import UART, Pin
import time
import shrike

shrike.reset()
shrike.flash("hello.bin")

reset_pin = Pin(2, Pin.OUT, value = 0)

uart = UART(0, baudrate = 115200, tx = Pin(0), rx = Pin(1))

print("port open")
print("reset")
reset_pin.value(1)
time.sleep(0.5)
print("release reset & boot")
reset_pin.value(0)


def test():
	print("reset")
	reset_pin.value(1)
	time.sleep(0.5)
	reset_pin.value(0)
	while True:
		time.sleep(0.1)
		if uart.any():
			reply = uart.read(1)[0]
			print(chr(reply), end="")




実行結果

>shrike0

Port open ok
[shrike_flash] FPGA reset done
[shrike_flash] FPGA reset done .
[shrike_fpga] flashing: hello.bin
[shrike_flash] FPGA programming done.
port open
reset
release reset & boot
MicroPython v1.26.0-preview.527.g599f545a3.dirty on 2025-10-11; Vicharak Shrike FPGA with RP2040
Type "help()" for more information.
test()
>>> test()
reset
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
^C
>

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?