I am doing a project that has the following components:
STM32F303 Microcontroller
RF Transceiver Module
SPI Line Driver (connected to another primary microcontroller that will be sending/receiving data to the STM32)
The STM32F303 Microcontroller will send commands to the RF module to transmit and receive RF signals (in this first scenario, the STM32F303 will be acting as a Master and the RF Transceiver as a Slave). At the same time, the STM32F303 will also be receiving commands from the primary microcontroller through the SPI Line Driver (in this second scenario, the SPI Line Driver would probably be acting as a Master, while the STM32F303 will be acting as a Slave).
Essentially, I am planning to connect all the MISO/MOSI/SCK pins together, and having two separate CS lines from the STM32F303 Microcontroller which:
A CS line to connect the STM32F303 to the RF Transceiver Module
A separate CS line to connect the STM32F303 to the SPI Line Driver
I have attached a block diagram of what the circuit would look like: Circuit Block Diagram
Is it possible for the STM32F303 Microcontroller to act as a Slave and a Master at the same time as pictured in the diagram above?
Thank you!
Related
I have two remote XBees each is connected to a microcontroller. The microcontrollers sample the waveforms of two different points of power system and send data to receiver xbee which ultimately is imported into LabVIEW.
Now the problem is I need to analyze the two different data streams without for example a data point from XBee 1 ending up in the XBee 2 data set.
One method that I think is to introduce some recognized numbers in sending data so that on its basis we can identity that the data is of Xbee 1 or 2. How can I do that?
http://forums.ni.com/ni/attachments/ni/170/964005/1/ThreePhaseNewwindow.vi
http://forums.ni.com/ni/attachments/ni/170/964005/2/Capture.PNG
I'm working on my second experiment for my master thesis and my supervisor had some requirements on this experiment and I don't really know how to proceed. Earlier I was thinking that it should be just to forward the packets but now facing the problem hands on I don't know where to begin.
The setup is Computer 1 ->Measurement point->System Under Test->Measurement point-> Computer2
The System Under Test consists of 2 VMs created with the XEN management tool XL.
There is a bridge from computer 1 on the interface "eth0" to "SUT" which is connected to the VM and the same thing on the otherside to computer 2.
I'm going to send 2 UDP streams and compare the timestamps over the measurement points with two servers on computer 2. The streams are going to be separated by port number and keyid for the stream.
My question is how do I make one of the UDP stream take the route through one of the VMs and the other UDP stream to take the other route?
Is it possible for an I2C master device to communicate with another I2C master device ?
Thanks
Yes! As long as it specifies that it can do Multi Master operation, then it can communicate with another Master device. There is a clock synchronization procedure that two masters need to perform. To see how that works, read this PDF, section 4.3.1
I2C FPGA Core from Opencores
Yes it's possible..
But clock synchronization is important part.
Hope u go through above given PDF.
I have programmed a couple of MSP430x6xx microcontrollers to serve as Master for some I2C slave devices. One of the MSP430s transfer the data received from I2C slaves to a PC using its built in USB Module. I want to extend this to allow all Micro controllers to send data received from their respective I2C slaves to PC using a common bus system. Will it be feasible to use SPI for transferring the data from all MSP430s to a single MSP430 master(already serving as I2C master and USB device simultaneously) which then transfers it to PC? I would appreciate any other suggestions. Thanks
Yes, it is feasible we will have to write your firmware to handle this. You have to identify on the PC somehow from whom SPI/I2C slave it comes the data. So, your main MSP430xxx will do this adding some kind of header to the data saying the id of the slave device.
I have some questions regarding communication over USB cable in Linux, in a Host-Target Device environment.(USB2.0) Please help as we are stuck for the below imiplementation.
We have a host PC connected to a target device (Linux OS) through USB cable.
On the target device we need to spawn 3 or 4 child processes. [Using fork() or some equivalent system call]
All the child process should communicate to the host PC independently though there own source file descriptor and sink file descriptors.
As per our experimentation, one process communicates to the PC at a time then the control is given to another process. But our requirement is for simultaneous communication. We are not sure whether USB driver(2.0/3.0) supports this methodology.
Any pointers regarding this will be helpful.
Thank you.
-AD
As per our experimentation, one process communicates to the PC at a time then the control is given to another process.
This is how computers work. Only one thread at a time has control of a particular CPU - when it blocks for i/o or exhausts its quantum, control is given to another thread.
What do you need simultaneity for that you can't manage with sending data one after the other?
USB is a serial bus protocol with a SINGLE DATA BUS, and this means, what you are looking for is not possible.
But we can have 4 different USB COMMUNICATION PIPES which can provide different paths, but NOT simultaneously.