Categories
Arduino Ask Engineering

Set control register to low in ds3231 rtc

I have been using ds3231 rtc module for keep tracking and make alarm along with backup battery. when I used it for first time it worked fine. but now it doesn’t keep track my time when the power lose it from main power but I have checked that my battrey is in safe. So I […]

Categories
Raspberry Pi User Help

I2C instabillity between a pair of Raspberry Pi

I have a connected a Raspberry Pi Zero (1.3, no W, running Raspbian 10 (buster) lite) as an I2C slave (clock:GPIO18,data:GPIO19) to a Raspberry Pi 3b (running Ubuntu 20.04.1) as an I2C master(clock:GPIO3,data:GPIO2). The wiring is Dupont style connectors of approximately 20cm length connected directly between the GPIO headers. The only configuration done is to […]

Categories
Raspberry Pi User Help

Serial (RS232) Controled Projector

I have a raspberry pi zero W and a NEC PA500U projector, and am attempting to set up a semi-permanent slideshow installation. My main sticking point right now is getting the pi to communicate with the projector via RS232 control codes, in order to turn on and off the projector and set the input. I […]

Categories
Raspberry Pi User Help

32 bits data transfer from Pi to FPGA using spidev

I’m trying to 32 bits data send and receive between Pi and FPGA using spi. So, I set the Pi as master and FPGA as slave. And use xfer2 function from spidev. But, I couldn’t read data. How can I fix it?. My simple spi test code is below. import spidev import time spi=spidev.SpiDev() spi.open(0,1) […]

Categories
Mastering Development

DBT_DEVNODES_CHANGED for some devices

I am trying to get a message when a smart-card reader is connected to the system, or when a card is inserted to the reader. It appears that I get WM_DEVICECHANGE with wParam set to DBT_DEVNODES_CHANGED for both of those devices along with many other devices. But this isn’t very useful as you can’t determine […]

Categories
User Help

Why isn’t windows loading the WINUSB Driver?

I’m developing a USB Device containing a couple of USB Functions (CDC-ACM and DFU as of now), using windows provided drivers. The device descriptor indicates the device uses IAD (Interface Association Descriptor) and the configuration descriptor reflects that, containing all the descriptors for the CDC function as well as the DFU Function. This configuration works […]

Categories
Mastering Development

Map a memory address to a variable

How do I map a memory address to a variable to create a structure at that memory location? I tried the following piece of code to create a struct at the given memory address but it simply dumps the segmentation fault? The memory location in the code is an Input Region where I need to […]

Categories
Mastering Development

Control intel edison GPIO problem for ACPI table

I have some question about ACPI table. I want to control Intel Edison default GPIO on boot, so I make ACPI table to control it. But did not cause any changes. This is my ASL code: DefinitionBlock ("mcu_default.aml", "SSDT", 5, "", "MCU", 1){ Scope (\_SB) { Device (DEV) { Name (_HID, "PRP0001") Name (_DDN, "GPIO […]

Categories
Mastering Development

How to identify device at i2c address?

I have a laptop running Ubuntu, kernel v5.8. It has two cameras which lack of functional drivers, and I want to try to get them to work. I’m hitting an immediate hurdle in that the devices don’t seem to be present in the way I (or indeed the ACPI tables) expect. For example for the […]

Categories
Mastering Development

static array of struct vs malloc array of struct with libaio

I repost the question with full source code. I’m struggling on Libaio for asynchronous file I/O. I think it’s too strange to understand. If I malloc array of struct & call io_prep_pwrite like following : #define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> #include <libaio.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <pwd.h> #include <assert.h> […]