vxworks和Linux pci转串口卡调试

VxWorks PCI驱动 VxWorks PCI 驱动开发 阅读详情

第一、vxworks下 pci转串口卡调试

1.网上查看是否有显示pci设备的函数,查到pciDeviceShow

2.在vxworks help中输pciDeviceShow,可以看到

pciConfigShow
NAME
pciConfigShow - Show routines of PCI bus(IO mapped) library


ROUTINES


pciDeviceShow( ) - print information about PCI devices
pciHeaderShow( ) - print a header of the specified PCI device
pciFindDeviceShow( ) - find a device by deviceId, then print an information.
pciFindClassShow( ) - find a device by 24-bit class code
pciConfigStatusWordShow( ) - show the decoded value of the status word
pciConfigCmdWordShow( ) - show the decoded value of the command word
pciConfigFuncShow( ) - show configuration details about a function
pciConfigTopoShow( ) - show PCI topology

3.在vxworks输pciDeviceShow

4.仔细分析发现vxbNs16550Sio.c 文件的pcie卡信息

#define UART_VENDOR_MOSCHP_SIO  0x9710
#define UART_DEVID_MOSCHP_SIO 0x9901

5.修改pcie卡信息为

#define UART_VENDOR_MOSCHP_SIO  0x9710
#define UART_DEVID_MOSCHP_SIO 0x9912

6.运行通过

第二、 Linux 下pci转串口卡调试

lspci

PCIE 调试过程记录 应用层调试方法,config space配置、memap空间的理解Pcie控制器的配置、使用从实际调试PCIE设备的过程看,设备调试和使用主要涉及到两个方面:config space和MMIO space。配置空间主要是用于配置PCIE设备。很多PCI设备仅仅支持64字节的配置空间。PCI和PCIe配置空间的区别如下:PCI/PCI-X和PCIe设备还扩展了0x40和0xFF这段配置空间,这段空间主要存放一些与MSI或者MSI-X 中断机制相关的Capability结构。...... 阅读详情

相关推荐

VxWorks 下PCI 驱动编程

VxWorks 下PCI 驱动编程 9056, 9054,9052,有源码,还有几十篇论文, 有1553B,CAN,PCI读写,SJA1000. 都是我前几年收集的。

fsl_e500 pci设备驱动vxworks的实现

开发环境:风河workbench3.2 —vxworks6.8  ,目标板:飞思卡尔powerpc mpc8536         NI PXIe机箱。 问题描述:目标板由NI公司的PXIE机箱供电,并插入零槽作为主控制器,现在实验室有自己研发的AD数据采集模块,也想插入机箱其他槽其作为目标板mpc8536的外设模块,二者通过机箱进行通信。 现在vxWorks系统起来了,串口\网口等驱动

qingfengtsing的专栏 4633

别再手动切换了!用SP3485+三极管搞定RS485自动收发电路(附完整原理图)

本文详细介绍了如何利用SP3485芯片和三极管设计RS485自动收发电路,解决传统手动切换带来的IO资源占用和软件复杂度问题。通过原理分析、电路设计拆解和实战注意事项,帮助工程师打造稳定可靠的自动收发通信模块,显著提升系统性能和可靠性。

weixin_26833939的博客 516

VxWorks常用命令

VxWorks常用命令

harhy的专栏 7499

Ubuntu22.04下安装LDAP

在Ubuntu22.04的时候可以使用apt的方式来安装,在安装LDAP的web 服务器的时候可以考虑选择 LDAP 帐户管理器 (LAM)。因为 PHPLDAPadmin 安装时需要 php 的环境依赖,相对来说安装麻烦。此外在 PHPLDAPadmin 中创建组织和用户时与平常的语法有很大不同,对新手来说不友好。

dl_11的博客 3944

RK3588 MPP视频编码实战:从环境搭建到高效封装

本文详细介绍了在RK3588平台上利用MPP(Media Process Platform)进行硬件视频编码的完整实战流程。从MPP库的环境搭建、编译安装,到核心编码参数(如码率控制、GOP、图像对齐)的深入解析,并提供了一个可复用的C++编码器类封装方案,帮助开发者快速实现高效的H.264/H.265视频编码,显著降低CPU占用。

weixin_29192211的博客 350

vxworks一些基本知识

"long long" and "unsigned long long" 类型, 本身定义了宏 ULLONG_MAX LLONG_MAX unsigned long long ll1; long long 112; ll1 = 2362231918310719548ull; ll2 = 2362231918310719548ll; printf("Type: %llu %lld\n",...

yudingding6197的专栏 708

动态库加载失败终极指南:从libbz2.so.1错误看Linux依赖管理本质

本文以经典的libbz2.so.1加载错误为例,深入剖析Linux动态链接库管理的核心机制。文章不仅提供从ldd检查、符号链接创建到LD_LIBRARY_PATH设置等实战解决方案,更系统性地讲解了动态链接器的寻库路径、版本管理及依赖问题预防策略,帮助开发者从根本上理解和掌握Linux依赖管理本质。

weixin_29212429的博客 451

发现pci设备

pci设备驱动开发,首先是要发现pci设备,从中获得pci设备的配置空间,并从中得到基本基本的资源信息。 首先进行pci设备查找的函数为: STATUS pciFindDevice( int vendorId, int deviceId, int index, int *pBusNo, int *pDeviceNo, int *p...

weixin_33889665的博客 305

FPGA实战:手把手教你实现VESA DSC编码(附Verilog代码解析)

本文详细介绍了如何使用FPGA实现VESA DSC编码器,包括核心架构设计、Verilog代码实现与优化技巧。通过流水线设计、色彩空间转换和预测编码等关键技术,帮助开发者掌握工业级DSC编码器的开发流程,并提供实用的调试与性能优化方法。

weixin_29165725的博客 408

AI颠覆市场调研:生成式智能体如何重构商业决策?

AI正在将市场调研从"成本中心"转变为"战略武器"。当企业能够用生成式智能体实时模拟百万级虚拟用户时,传统调研的样本偏差、时间滞后、成本高昂等问题将不复存在。对于开发者而言,这不仅是技术的狂欢,更是参与商业规则重构的历史机遇。行动建议立即体验Simile/Aaru的智能体平台,验证虚拟样本效果参与LLM持续性记忆架构的开源项目(如Memory Llama)关注AI调研API的标准化进程(如Hugging Face的Market Research Toolkit)

这里汇聚了前沿的技术分享与实用的开发技巧,带你探索从创意到企业的技术创业之路。 617

MPC8360E/MPC8358E勘误实战:中断、DDR与PCI总线问题深度解析与规避

在嵌入式系统开发中,芯片勘误(Errata)是确保系统长期稳定运行的关键文档,它揭示了芯片在特定边界条件下的非预期行为。其核心价值在于指导开发者规避硬件层面的潜在风险,涉及中断机制、总线时序、内存控制器等基础模块。从技术原理上看,勘误问题往往源于硬件状态机的竞争条件、时序参数的微小偏移或协议交互的死锁。例如,中断嵌套可能导致内核挂起,DDR内存的保持时间参数违规会缩小数据有效窗口,而PCI总线时钟比例不当或信号交互异常可能引发功能失效。这些问题的技术价值在于,它们迫使开发者必须深入理解硬件底层机制,并采用软

weixin_33785108的博客 719

【100%通过率】华为机试真题 Python 实现【对称美学】【2022.11 Q4 新题】

对称就是最大的美学,现有一道关于对称字符串的美学。 已知: 第1个字符串:R 第2个字符串:BR 第3个字符串:RBBR 第4个字符串:BRRBRBBR 第5个字符串:RBBRBRRBBRRBRBBR相信你已经发现规律了,没错! 就是第i个字符串=第i-1号字符串的取反+第i-1号字符串。取反即(R->B,B->R); 现在告诉你n和k,让你求得第n个字符串的第k个字符是多少。(k的编号从0开始)

MISAYAONE的博客 1万+

VxWorks常用命令(备忘)

i 显示任务基本信息,参数为0时显示全部任务。 ti 显示任务的TCB信息。 d 显示目标地址内存内容。 devs 列出目标机系统上的全部设备。 version ...

撒哈拉的绿洲 1万+

Linux C/C++ or 嵌入式面试之《C/C++笔面试系列》(10) C++ 前置后置增减运算符重载形式与比较

C语言的++、–运算符在此不讨论。 文章目录1、前置后置增减运算符重载的形式2、前置和后置运算符的性能比较 1、前置后置增减运算符重载的形式 自增运算符“++”和自减运算符“–”分别包含两个版本。即运算符前置形式(如 ++x)和运算符后置形式(如 x++),这两者进行的操作是不一样的。因此,当我们在对这两个运算符进行重载时,就必须区分前置和后置形式。C++根据参数的个数来区分前置和后置形式。如果按照通常的方法来重载 ++ 运算符(即作为成员函数重载时不带参数,或者作为非成员函数重载时带有一个参数),那么重载

二进制君 5834

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

VxWorks下PCI驱动的配置与测试

理论知识 见《VxWorks系统的PCI总线配置与应用》 实现步骤: 建立工程,添加BSP包; 将驱动测试代码surfConfPciDevice.c加入工程中; 在usrAPPInit.c中添加测试程序,surfConfPciDevice(int vendorId, int devId, int myIndex),厂商号和设备号在BIOS启动时会打印在屏幕...

weixin_34034261的博客 623

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

常用的vxworks调试函数

int indexint bus_No。

weixin_43354598的博客 213

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

[vxworks]环境变量命令

打印环境变量:printenv 修改环境变量:setenv XXX “xxx” 保存环境变量:saveenv 每次设置完环境变量必须保存。 查看pci设备信息:pciHeaderShow 6 6代表pci设备所在bus总线,具体使用看情况。

weixin_42492248的博客 728

T1042/T2080 vxWorks7开发笔记(二)

本章节主要讲解如果根据组件或根据设备树查找对应的驱动 网口驱动设备树 &fman0 { ethernet@f0000 { compatible = "fsl,fman-memac"; reg = <0xf0000 0x1000>; }; mdio@f1000 { #address-cells = <1>; #size-cells = <0...

yhcs1213的专栏 2165

Linux&vxWorks总线设备驱动模型

1. linux platform模型 Platform 机制的本身使用并不复杂,由两部分组成: platform_device 和 platfrom_driver 。 通过 Platform 机制开发底层驱动的大致流程为 :  定义 platform_device ->注册 platform_device ->定义 platform_driver à 注册platform_driver

qingfengtsing的专栏 2584

第23章Linux设备驱动的移植之Linux与其它操作系统之间的驱动移植

23.4 Linux与其它操作系统之间的驱动移植       在公司的项目更替过程中,可能会出现操作系统的更换,譬如类似的产品中,以前用 VxWorks或 Windows CE,现在想改用 Linux。以前同类产品的 VxWorks/WinCE 运行稳定,且设备驱动也被经过严格测试,现在要换成 Linux 了,是不是 VxWorks/WinCE 下的工作就完全作废了呢?       在采用原操作系...

xiezhi123456的博客 963

Linux串口出厂测试工具与使用说明

本文针对Linux系统上如何对各类串口硬件进行出厂测试进行硬件连接和软件使用说明,提供的软件测试工具wchsertest,适用于USB、PCI、PCIe转串口设备等、同样也适用于原生ttyS串口。实例1(测试CH342的UART0):sudo ./serial_port_test -D /dev/ttyCH343USB0。实例2(测试CH382的UART0):sudo ./serial_port_test -D /dev/ttyWCH0。(1)插入待测试USB/PCI/PCIe转串口设备。

PC小能手的博客 2099

linux串口配置驱动程序,Linux下安装PCI转串口卡及USB转串口器的驱动方法

一、PCI转串口卡安装 型号NetMos Nm9835CV1、插入PCI卡到主机2、启动 Linux,打开终端3、输入命令:#setserial /dev/ttyS0 -a (COM-1)显示内容:/dev/ttyS0, Line 0, UART: 16550A, Port: 0x3f8, irq: 4Baud_base: 115200, clos_delay: 50, divisor:...

weixin_39849800的博客 927

Linux下PCI转串口卡及USB转串口

公司卖给客户两台互为备份的加密机和一台服务器,加密机使用串口而服务器只有一个串口。尽管加密机也可以用TCP,但现在程序不支持。要修改程序,工作量比较大,于是想到用转换器。[@more@]下面从网上找到的参考,自己小改了一下儿。一...

547

linux下pcie串口卡驱动安装,pci串口卡万能驱动

万能PCI串口卡驱动程序,支持绝大多数的串口卡。支持WINDOWS/LINUX系统。支持98/me/2000/xp/vista/server系统。运行PCISETUP.EXE安装程序,选择卡的类型,点击INSTALL安装。安装方法1.请选择卡的类型;2.点击《INSTALL》按钮进行驱动安装;3.点击《UNINSTALL》按钮进行驱动卸载。PCISETUP.exe是PCI卡的驱动安装工具,您可以用...

weixin_34199121的博客 2435
下一篇: vxworks外部中断处理
qingfengtsing
博客等级 码龄15年 343粉丝 110原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值