Category Archives: Computer Engineering
Example : STM32F411CEU6 mem-to-mem DMA interrupt

https://wiki.st.com/stm32mcu/wiki/Getting_started_with_DMA#DMA_memory-to-memory_example_overview
Waveshare-ESP32-C6-1.47-Touch + Micropython + LVGL

Special Thanks to Mr kdschlosser for writing the driver Example: More Examples on https://github.com/quantrpeter/Waveshare-ESP32-C6-1.47-Touch-Micropython-LVGL
Waveshare ESP32-C6-Zero + LVGL + ST7735S + 80x160 LCD

Perfect 3D print for Ender 3 Pro

My old Ender 3 Pro, give 0.3mm X-Y Hole compensation, now no need polishing, I can plug them into another. Two filament print from two different nozzle temperature, same perfect.
Waveshare-c6-zero + st7735

https://gitlab.quantr.hk/example/micropython/waveshare-c6-zero-st7735
Waveshare ESP32-C6-Zero + LVGL + ST7735S

https://www.waveshare.com/wiki/ESP32-C6-Zero
Run: Micropython + LVGL on CYD (Cheap Yellow Display

Example: Clock Cheap Yellow Display Pins Connector types Connector Type Note P1 4P 1.25mm JST Serial P3 4P 1.25mm JST GPIO P4 2P 1.25mm JST Speaker CN1 4P 1.25mm JST GPIO (I2C) What pins are available on the CYD? There are 3 easily accessible GPIO pins Pin Location Note IO35 P3 JST connector Input only pin, […]
Mac: Run ubuntu command with GUI in docker

Step 1: create Dockerfile Step 2: Build the image docker build -t xclock-ubuntu . Step 3: Set XQuartz and restart it Step 4: Run "xhost + 127.0.0.1", and this "xhost +localhost" wont work Step 5: Run Another way
Run Micropython in CYD (Cheap Yellow Display) and control the TFT

Official Tutorial From TaoBao Factory : https://github.com/quantrpeter/2.8inch_ESP32-2432S028R Remark: use offset 0x1000 to write the firmware and have to erase flash first, so: Download micropython firmware here https://micropython.org/download/ESP32_GENERIC/ 1. esptool.py erase_flash2. esptool.py --baud 460800 write_flash 0x1000 ESP32_GENERIC-20250415-v1.25.0.bin Download All Files in below links, or by the attachment in this posts ILI9341 Display Driver Download ili9341.py from: […]
Solved: unable to write to cheap yellow display esp32

In mac, sometime arduino unable to write the program to cheap yellow display esp32, you can type the command manually
AT28 Flash board

Tutorial build micropython for WEACT_F411_BLACKPILL

using st-flash is better then dfu-util because we don't need to put the board into dfu mode
AT28 Programmer (Java + Arduino)

https://gitlab.quantr.hk/quantr/toolchain/java-at28-programmer https://gitlab.quantr.hk/example/arduino/at28-programmer
MicrPython SSH1106

IT IS SSH1106,NOT SSD1306
Waveshare ESP32 Zero C6 - RGB led micropython example

testing ESP32 UART using MicroPython

Mac command to read from UART
solved: nextpnr-ice40 Library not loaded: '@rpath/Python3.framework/Versions/3.9/Python3'

run this command
Solved: macports fatal error: 'boost/filesystem/path.hpp'

Edit CMakeLists.txt, add these two line on top
Two ways to init the output pin and remain same value

The correct way to send code to micropython via uart and run

There are two mode in micropython: REPL vs paste mode. I guess the uart of my ESP32 board has no flow control, so you can't send all bytes at once, because it is too fast, so I sleep 100 ms for every 100 bytes. REPL mode You can't just send your python code, you need […]
Solved Chisel : Error compiling the sbt component 'compiler-bridge_2.12'

When running the chisel book example, we got Error compiling the sbt component 'compiler-bridge_2.12'. Here are the way to solve it git clone https://github.com/schoeberl/chisel-examples.git Edit hello-world/build.sbt Edit hello-world/src/main/scala/Hello.scala
解剖玩具麥輪車

MX512G : 低压单通道有刷直流电机驱动器, RMB $2MX1616S : 双路有刷直流马达驱动电路, RMB $7.8TRSP5040A : SOP8語音OTP芯片40秒碩呈語音播報IC程序開發, RMB 0.27RF2520A : 无线遥控收发器芯片, RMB $4.3
Tutorial to setup RF-Nano

https://item.taobao.com/item.htm?_u=ibuhab0bb1b&id=628418040642&spm=a1z09.2.0.0.76e02e8dYbXP6k
STM32 + DHT11 example

https://gitlab.com/peter-example/stm32/thei-stm32-demo-stm32f411ceu6
Add -g option to riscv-tests

To enable debug, "CFLAGS=-g ./configure" won't work, edit ./isa/Makefile and add -g to variable RISCV_GCC_OPTS then it works. The dump file won't show debug info, run "riscv64-unknown-elf-objdump -DS rv64ui-v-addi" then you see it
HKPS First RISC-V Board

Weact Logic Analyzer

https://github.com/WeActStudio/LogicAnalyzerV1
All the gates I have

如果想知道容器嘅原理

如果想知道容器嘅原理,我圈起左
IoT sensors

Good ELF diagram

http://blog.k3170makan.com/2018/10/introduction-to-elf-format-part-vi.html
Fixed dwarf bug

When i change kernelvec.S to -ggdb, my dwarf library broken but now fixed. Commit :e640c3d9 And I still don't understand why .S won't be an compile unit in dwarf, why design like that.
Quantr Dwarf Library - Print address/lineNo/ColNo from specific address

Install apache and php for http research

I need a super clean apache and forward all PHP requests to a independent php-cgi process which host by a specific port 1. Install Apache Mac In ubuntu, no need to build apache from source, just "sudo apt-get install apache2" Linux 2. Install PHP Mac Linux if you meet this error "configure: error: re2c 1.0.3 […]
The way to extend qemu TCG plugin functionality

Hi, if want to to provide other function-calls to TCG plugin, such as reading guest memory, follow these steps: https://peter.quantr.hk/2024/01/qemu-risc-v-log-all-memory-operations/ 5. Run in qemu 6. Edit xv6-riscv Makefile: References:
QEMU risc-v , log all memory operations

Step 1: Step 2: modify ./tests/tcg/plugins/mem.c , add this code in vcpu_mem() Step 3: in xv6-riscv change this to Then you see this References
Qemu's trace_memory_region_ops_write

I was trying to find the body of trace_memory_region_ops_write function in qemu source code, can't find it. It is generated by python script (log.py)
RISC-V qemu doesn't log "PRIV" in every instruction

RISC-V qemu seems wrong because it doesn't log "PRIV:" in every instruction in qemu.log. Even mret is execute and the mode is changed, it doesn't log "PRIV". To fix this:
Create a breadboard FPGA

We tried to ask GOWIN to let us generate the bitstream but seems they are not willing to open their standard, xilinx and altera has no hope too. So for education purpose we now go for build a simple one. We found the way to break logic into LUTs, so we want to build a […]
NOR vs NAND flash

i finally found the differences between NOR and NAND flash, but just dont know what is it