高通工厂ATA测试

高通工厂ATA测试

ATA测试PC端工具为QSPR,源码可以从高通网站下载,进行定制。

1、OTG 测试方法

接线方法:将ATA测试盒上25 PIN接头上的ID脚信号空接,RGB测试板P9连接器的一端接手机主板要求的电阻,RGB测试板P9连接器上的另一端连接到手机主板上的地脚。

测试流程:
1、RLY_OTG_EN 置高,此时ATA 测试板断开给手机的VBUS供电
2、延迟1000mS。然后读取OTG_VBUS_STAT,看VBUS是否是低(此步读取可取消,但延时需要保留)。
3、RLY_CTP 置高,此时ATA测试板拉低USB接口的ID脚,VBUS由手机输出。
4、延迟200ms,然后读取OTG_VUBS_STAT,看VBUS是否是高。
5、RLY_CTP 置低,释放下拉ID脚。
6、RLY_OTG_EN 置低,恢复USB的通信。

注意事项:测试过程中不管成功或失败,测试完毕后确保RLY_CTP必须置低。
(测试方式可能后续还会变化,可以联系盒子的生产商询问测试方案)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
以下是高通平台 SPI 测试示例代码,供参考: ```c #include <linux/module.h> #include <linux/kernel.h> #include <linux/fs.h> #include <linux/spi/spi.h> #include <linux/delay.h> #include <linux/slab.h> #define SPI_DEVICE_NAME "spi_test_device" #define SPI_DEVICE_MINOR 0 static struct spi_device *spi_dev; static int spi_test_open(struct inode *inode, struct file *file) { printk(KERN_INFO "SPI Test Device Opened\n"); return 0; } static int spi_test_close(struct inode *inode, struct file *file) { printk(KERN_INFO "SPI Test Device Closed\n"); return 0; } static ssize_t spi_test_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { printk(KERN_INFO "SPI Test Device Read\n"); return 0; } static ssize_t spi_test_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { printk(KERN_INFO "SPI Test Device Write\n"); return count; } static const struct file_operations spi_test_fops = { .owner = THIS_MODULE, .open = spi_test_open, .release = spi_test_close, .read = spi_test_read, .write = spi_test_write, }; static int spi_test_probe(struct spi_device *dev) { int ret; printk(KERN_INFO "SPI Test Device Probed\n"); spi_dev = dev; ret = alloc_chrdev_region(&dev_num, SPI_DEVICE_MINOR, 1, SPI_DEVICE_NAME); if (ret) { printk(KERN_ERR "Failed to register SPI Test Device: %d\n", ret); return ret; } cdev_init(&c_dev, &spi_test_fops); c_dev.owner = THIS_MODULE; c_dev.ops = &spi_test_fops; ret = cdev_add(&c_dev, dev_num, 1); if (ret) { printk(KERN_ERR "Failed to add SPI Test Device: %d\n", ret); unregister_chrdev_region(dev_num, 1); return ret; } return 0; } static int spi_test_remove(struct spi_device *dev) { printk(KERN_INFO "SPI Test Device Removed\n"); cdev_del(&c_dev); unregister_chrdev_region(dev_num, 1); return 0; } static struct spi_driver spi_test_driver = { .driver = { .name = "spi_test", .owner = THIS_MODULE, }, .probe = spi_test_probe, .remove = spi_test_remove, }; static int __init spi_test_init(void) { int ret; printk(KERN_INFO "Initializing SPI Test Device\n"); ret = spi_register_driver(&spi_test_driver); if (ret) { printk(KERN_ERR "Failed to register SPI Test Driver: %d\n", ret); return ret; } return 0; } static void __exit spi_test_exit(void) { printk(KERN_INFO "Exiting SPI Test Device\n"); spi_unregister_driver(&spi_test_driver); } module_init(spi_test_init); module_exit(spi_test_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Your Name"); MODULE_DESCRIPTION("SPI Test Device Driver"); ``` 这是一个简单的 SPI 设备驱动程序,它创建一个名为 `spi_test_device` 的字符设备,并在 probe 函数中将其与 SPI 设备进行关联。在此之后,您可以使用标准的字符设备读写函数来与 SPI 设备进行通信。
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值