I have written a custom PLB core for my design, and added interrupt functionality during custom core generation. Interrupt generation logic is designed in custom peripheral. For interrupt control, I added XPS interrupt controller (v2.01a) to the system and connected my custom core's interrupt ports to INTC via master bus. However, as I need to connect IRQ output of INTC to Interrupt input of Microblaze (v8.40), I cannot connect those two ports using Ports tab of System Assembly View, there is no connection option except external port and core's itself. I tried to do it manually on .MHS file, but still I cannot see IRQ and Interrupt ports connected in Graphical Design View. Besides, in Bus Interfaces tab of Assembly View, I can see INTERRUPT port of Microblaze but again, no change can be made.
Use AXI_INTC insteed of XPS_INTC and it should work.
There you will find two bus :
AXI BUS
INTERRUPT BUS.
You will be able to connect the interrupt bus to your MicroBlaze component
Related
I am looking at implementing USB communication on a MCU which has a USB engine built into it. Basically you have access to the pipes/endpoints.
I am a little bit confused on the USB stack now. It appears that drivers operate on another level above the pipe/endpoint setup, so the pipe/endpoint is like a middle level layer that drivers are built on. Is this correct?
Secondly, I am interested in simulating serial communication over USB. It appears windows has a premade driver so on the computer side I do not need to program the pipe level.
How do I find out what I need to implement on the MCU to make it behave correctly with the generic serial driver?
This is an answer to your second question regarding the serial communication.
The USB standard defines a communication device class (CDC) for serial communication. The required drivers on the host side are implemented by Windows, macOS, Linux and many more operation systems.
The relevant CDC subclass is PSTN. The relevant documents are found in Class definition for Communication Devices 1.2.
The device basically implements four endpoints:
Control endpoint for configuration requests (baud rate, DTR state etc.). Have a look at SetLineCodeing, GetLineCoding and SetControlLineState.
Bulk endpoint for USB to serial transmission
Bulk endpoint for serial to USB transmission
Interrupt endpoint for notifications (DCD state, errors). See SerialState.
And of course you need to get the device descriptor right.
On top of that, you need to implement all the standard USB requests.
Chances are high that this has already been written for your MCU, both the standard requests and the serial communication. So why not use the existing code?
I have multiple devices on MDIO bus (one AR8035 PHY, and 6 DP83849IFVS dual PHYs). The bus is connected to AM335x SoC with linux 4.14.40. Davinchi_mdio scans bus and finds all devices and attaches driver I think for AR8035. How can I access this bus via mdio? I want to write stand-lone (not PHY driver) kernel module, that can simply access mdio bus? How can I do that? I wanted to do that with phy_write/phy_read but I can't get struct phy_device* from my kernel module. How can I get struct phy_device* from the name of the interface ("eth0"). Will it be safe in terms of locks/mutaxes?
If you already have an subsystem for MDIO controller, then I can think of implementing an UIO driver for MDIO interface, which deals with read and write.
UIO driver is safe when compared to the messy kernel driver and complete control will be with the user application which uses that UIO.
**
*Each UIO device is accessed through a device file and several sysfs attribute files. The device file will be called /dev/uio0 for the first device, and /dev/uio1, /dev/uio2 and so on for subsequent devices.
/dev/uioX is used to access the address space of the card. Just use mmap() to access registers or RAM locations of your card.
Interrupts are handled by reading from /dev/uioX. A blocking read() from /dev/uioX will return as soon as an interrupt occurs.*
**
I'm looking to write a simple Windows driver to enable running TCP/IP over a proprietary RF module. The module already provides Ethernet-style data packets with source/destination MAC, so I just need to layer IP packets (generated by the regular Microsoft IPv4 subsystem), set the MTU appropriately so they will be the right size, and then call the module's serial API. I'll need to be able to handle transmit statuses and implement an ARP protocol as well. I want the driver to expose a new interface similar to a wifi or ethernet card in Network Connections and use the normal Windows IP stack.
The module is UART and might be connected via FTDI chip, RS-232 converter, or native UART on an IoT Core board, so it will just be talking to a generic serial port. I am fine with only running on Windows 10, but I'm still not sure what to use. Can I use the UWP VPN provider? Do I need to write an NDIS miniport driver, or an interface provider? Also, how will I handle the driver needing complete control over the serial port at all times? I can't write a serial driver as it might be connected via many different types of serial ports.
I am working on the lowRISC recently, and I want to add Ethernet support for it. I have added the Ethernet IP and have wired it to both AXI bus and Ethernet PHY, and I added the Ethernet interrupt to the interrupt wire just like uart and spi do.
Now I am working to write a driver in linux kernel to support my Ethernet. But I don't find the handle functions to uart and spi interrupts, just 2 interrupts called IRQ_SOFTWARE and IRQ_TIMER(which in file arch/riscv/include/asm/irq.h).
How does the lowRISC chip handle the uart and spi interrupts? And What should I do to handle the interrupt of ethernet on lowRISC chip?
I am developing an application to communicate with hardware module and control it. Programatically I have to find out weather other Hardware end is alive or not. In Win32 is there any features to find out this at serial port initialization time? (when calling CreateFile(...))
[We can send something and wait for reply. But I feel that it is bit odd approach.]
Depends on the device.
If your device indicates readiness using the flow control bits (i.e. DSR or CTS), then GetCommModemStatus.
For an arbitrary serial device, you would need a transceiver capable of distinguishing zero voltage from a valid mark or space signal, and standard PC serial ports aren't.