module ZephRay;

今朝有鱼今朝摸

Category

  • 摄影
  • 玩机
  • 硬件坑
  • 翻译
  • 软件坑
  • 随记

Tags

  • LCD
  • 点屏
  • 单片机
  • 计算器
  • 事
  • FPGA
  • 摄影
  • STM32
  • 古董
  • 测评
  • Verilog
  • 笔记本
  • 改造
  • ARM
  • 移植
  • Linux
  • 树莓派
  • nspire
  • 教程
  • 小动物
  • LED
  • 项目
  • EPD
  • GameBoy
  • 景
  • IBM
  • HP
  • SDL
  • ThinkPad
  • 3DS
  • 晒机
  • Minecraft
  • Kindle
  • 82ES
  • 花
  • Assembly
  • 手办
  • Chiptune
  • 仙剑奇侠传
  • 演讲
  • NDSL
  • 贴图
  • Nikon

Recent replies

  • 城市猎人 发表于「IBM ThinkPad 560E (Type 2640) 简单展示」
  • Khiemmy 发表于「On the way to overclock the TI nspire CX II calculator」
  • critor 发表于「On the way to overclock the TI nspire CX II calculator」
  • ZephRay 发表于「On the way to overclock the TI nspire CX II calculator」
  • critor 发表于「On the way to overclock the TI nspire CX II calculator」
  • imbushuo 发表于「About Me」
  • 070 发表于「古董电脑选型」
  • Thermit 发表于「About Me」
  • 盛崖鱼 发表于「About Me」
  • Wenting Zhang 发表于「About Me」

My

RSS (中文优先)
RSS (English preferred)

坑 / Projects
关于我 / About
简历 / CV
破烂采购计划 / Craplist
古董电脑选型
SM83(GB CPU)指令编码
Linux PI 1M位跑分
Coremark跑分
音质参考

淘宝杂货铺
Bilibili空间
GitHub

Links

cnVintage古董电子论坛
cnCalc计算器论坛

Keshuai Xu
家骅的锦绣谷
>Lithia's Core
ntzyz's space
丘丘塔台
tonoko.moe
kasora's blog
447f.Misaka
paizhang.info
spinmry实验室
Hikari Calyx Tech.
春上冰月的博客
初音没有来
FindHao
Test2g
Shell Bin
LEAFER x LAB

HP Prime G2 Reverse Engineering

2019 年 7 月 13 日分类:硬件坑#计算器#改造
Hint: this post is also available in Chinese.

Specifications

  • CPU:MCIMX6Y2DVM05AB(528MHz,Cortex A7)
  • RAM:H5TQ2G63GFR(256MB,DDR3)
  • Flash:H27U4G8F2D(512MB,3.3V)
  • PMIC:PF1550
  • LCD:GPM1006(320xRGBx240,Serial-RGB,ILI9322B)
  • TSC:GT9288

Boot Mode

The following test points are present on the PCB:

  • BT0L - Boot Mode 0 Low
  • BT0H - Boot Mode 0 High
  • BT1L - Boot Mode 1 Low
  • BT1H - Boot Mode 1 High

Circuits nearby: (front side)

GND  T1H  T1H  GND
10K  10K   0R   NC
TMOD 3V3  T1L  T1L

GND  T0H  T0H  GND
4K7   NC   NC   NC
TCK  3V3  T0L  T1L

To enter USB DFU mode:

  • Remove the 10K resistor between T1H and 3V3
  • Solder a 10K resistor between T0H and 3V3
  • Solder a 0R resistor between T0H and T0L (not sure if necessary)

There should be (lot of) other possible ways to change the bootmode or force it to fallback to the DFU mode.

Note: It is technically not a USB DFU (Device Firmware Upgrade) mode as it does not utilize the standard DFU protocol. It uses the i.MX Serial Download Protocol. I call it DFU as this is a more common term for such things.

MORE

Pano Logic G1 (4) - USB

2019 年 6 月 9 日分类:硬件坑#FPGA#单片机
Hint: this post is also available in Chinese.

I promised that there would be an update about the USB, here it is. This update would only talk about the USB 2.0 Host on the Pano Logic G1 devices with ISP1760 USB host controller, so it is probably not applicapable to other platforms. The goal here is to write a set of RTL and software stack, so it is possible to use USB HID joystick/ gamepad and USB mass storage devices on the Pano G1. Speed would not be the concern here.

Hardware Connections

On the Pano G1, an USB 2.0 high-speed host controller (Phillips ISP1760) is connected to the FPGA via 16-bit parallel memory bus. To mitigate one of the controller’s errata, an USB high speed hub (SMSC USB2513) is connected to one of the downstream port of the controller, and all user accessible ports are connected to the USB hub.

Overall Architecture

Though it might be possible to write a FSM to implement some basics of the USB host protocol stack, it is just not very practical. (Device side might be more practical, though). The solution I have here is to continue use the PicoRV32 soft-core processor on the FPGA. The host controller would be mapped to PicoRV32’s memory space as MMIO, then software driver and protocol stack can run on the PicoRV32. When needed, certain outputs can be achieved by using MMIO GPIO (for example, output the currently pressed keys). Hopefully, debugging software would be much easier than debugging hardware.

Generally, there would be several layers. The bottom part is called as the HCD (Host Controller Driver), which is specific to particular hardware, like the controller chip being used. Then it comes the HD (Host Driver), this is the part handles device enumeration and USB Hub communication, this layer is no longer specific to the platform. Higher than that is the class driver, as name suggests this is specific to a device class, for example, HID class or audio class. The driver might be generic to the whole class, or it might just support one of few specific USB devices. Higher than that, usually it is operating system, or in our case, user application.

In conclusion, there are 5 things I need to do:

  1. Write the RTL to interface ISP1760 with PicoRV32
  2. Port or write the HCD for ISP1760
  3. Port some appropriate host driver over
  4. Port or write the class driver for HID gamepad and mass storage devices
  5. Write some application code to use the driver

Let’s discuss all these parts.

MORE

LatchUp19 talk: 自制一台FPGA GameBoy掌机

2019 年 5 月 5 日分类:硬件坑#FPGA#GameBoy

嗯……受邀去做了一下演讲,懒得翻译了,就发生肉了,中式英语大家都听得懂吧(笑) 大致介绍了一下我设计GameBoy掌机项目的一些经历。完整的项目相关的东西可以见这里:VerilogBoy项目页。

  • https://www.bilibili.com/video/av51601240/

MIPI-DSI 点屏笔记

2019 年 4 月 30 日分类:硬件坑#LCD

前言

MIPI-DSI接口因为需要更少的IO数量,能够提供连接器体积和布线难度上的一些优势,而被广泛应用于手机和手表屏幕上。显然作为一个点屏爱好者我也不可能忽略这种常见的屏幕接口,只是之前一直没有机会亲自研究一番,这次借着VerilogBoy的机会也算是大致了解了一下。考虑到MIPI为私有接口,对于其具体的描述在网上并不多,这里就具体介绍一下我对MIPI DSI的了解。需要注意的是,文中所有内容均基于互联网上可以找到的文档编写,并不可能完整描述MIPI DSI标准,甚至可能存在偏差或错误。本文仅供需要调试MIPI屏幕的工程师或业余爱好者入门参考。

基本概念

需要知道的是,MIPI DSI仍然只是一种用于连接屏幕的接口,而不是连接显示器的接口。前者常见的例子如DBI(包括8/16位并口和SPI)、DPI(也称为TTL,RGB和PixelBus等)和LVDS(也称为FlatLink),而后者常见的例子如VGA、DVI、HDMI和DP。前者的特点就是,通常驱动是和屏幕具体参数相关的,不同的屏幕需要不同的驱动程序。而后者的特点是,通常驱动是通用的,显示器可以通过DDC/CI或其它方式将相关的参数(如EDID)传输给驱动,驱动根据得到的信息产生需要的信号。通常来说,前者多用于嵌入式场景。不过现在后者中也出现了eDP专用于嵌入式,也许在以后能代替掉一部分现有的DSI使用场景。本文还是只讨论DSI。既然这么分类了,也就很明确,DSI也是一种不同屏幕不同驱动的接口,“DSI”其实大部分只是对于物理层和传输层的定义,具体的屏幕操作其实更往上还是以前DBI和DPI那一套。不如说,DSI其实就是把DBI和DPI打了一个包,让他们能共享几对差分线一起传输。以下所有讨论的内容仅考虑从主机到屏幕的单向传输。

低功耗模式与高速模式

DSI的物理层传输有两种模式,一种是1.2V CMOS电平的低功耗单端(LP)模式,另外一种是高速差分(HS)模式。在单端模式下,时钟线并不被使用,D0+和D0-用于传输数据和时钟,最大速度为10Mbps,其它的数据线不被使用。在差分模式下,时钟线用于传输差分时钟,最多可以有四对数据线用于传输数据,最大速度为每对数据线1Gbps。

屏幕上电后默认情况下数据线和时钟线都处于LP模式下(CLK+/CLK-均为高电平)。在LP模式下时钟线可以使用如下的系列进入HS模式:

MORE

Pano Logic G1 (3) - UART & Hard fault

2019 年 3 月 26 日分类:硬件坑#FPGA#Verilog
Hint: this post is also available in Chinese.

It has been a while since my last update. I have been working on the USB stuff for Pano Logic G1, mainly for connecting to joysticks and flash drives. I was concerned that my LPDDR and cache would cause me some trouble when the code is being executed in RAM, but so far they are holding up well. I will talk more about them in the next log. In this log I would like to talk a little about some debugging utilites, namely, the UART and the hard fault.

UART

UART is very handy when you want to see logs from the device. At first I thought I can get away just by using VGA text terminal, but it soon turns out that 80x30 text is simply not enough. Unfortunately the Pano Logic doesn't have any serial ports. From the schematics, it seems that they originally have one, but was removed after some revisions. But anyway, I have to repurpose the IOs to create myself a serial port to use.

This is not new to Pano Logic, Skip Hansen from PanoMan project has already done this: he soldered a wire to the LED pin and get the serial output from there. For me, as mentioned in one previous log, I do not have soldering iron with me currently, so I need to find some other way.

As an alternate, I used the wire clip come with my logic analyzer. They can be attached to through-hole components easily, such as this VGA connector.

I am using VGA SCL pin for the serial port. I wrote an extremely simple UART transmitter to transfer the data: https://github.com/zephray/VerilogBoy/blob/refactor/target/panog1/fpga/simple_uart.v. Why I don't just use Skip's UART transmitter core for Pano Logic G1? Or why I don't just work on top of Tom and Skip's project? Well, the (stupid) answer is the same regarding why I picked PicoRV32 rather than VexRiscv: I have decided (long ago) to call this project VerilogBoy, so all the source code should be written in Verilog, not SpinalHDL. Yes I am also aware there are tons of better open-source UART controller written in Verilog available online. I am probably just too lazy to find one considering I don't need other fancy functions anyway.

MORE
  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 32
  • »
Copyright © 2009-2019 Wenting Zhang. All rights reserved.
Unless otherwise noted, content on this blog is licensed under CC BY-SA 4.0.