I want to port Zephyr to my soc , which is based on ARM-M4 but customised and based on Zephyr's documentation, I have to port SOC Family, SOC Series , SOC , Board. So I have started off with a supported board (nucleo-f401re) and trying out board level porting which i managed to pull off. However I have no clue where to begin with the SOC Family, SOC Series , SOC port.
I am fresh undergrad and new to this domain and apologise in advance for silly questions.
I have gone through the board files and drivers. Which include DTS and DTSI files and drivers written by ST for nucleo-f401re for reference but I dont understand what are the interfaces or files or folders that need to be changed if I go archtitecture porting.
Related
Many STM32 chipsets support 1 or 2 channel CAN PIN Outs.
Is there a CAN bus library for STM32 to direct connect with a CAN transceiver such as MCP2551? But it does not matter what the CAN transceiver is.
A CAN transceiver is just a high speed step down converter. (on a basic level)
CAN protocol works in a variant of voltage ranges. MCP2551 is a set CAN transceiver suitable for 12V and 24V systems. With added features to help with the physical layer like externally-controlled slope for reduced RFI emissions, detection of ground fault, voltage brown-out protection, etc.
It has no dependency on the CAN logic. It is just to help you with the bare physical layer.
To answer your question:
As RishabhHardas recommended, use the HAL library provided by STM32 through CubeMx.
Using CubeMx
This is a software provided by ST-Micro to help you setup the boilerplate code for any peripheral application.
You can also check out the examples projects provided by STM in the Cube. This will give you a kick-start in understanding CAN on STM32
STM32Cube_FW_F4_V1.9.0\Projects\STM324xG_EVAL\Examples\CAN\CAN_Networking
After setting it up, you'll be able to call HAL_CAN_Transmit() and HAL_CAN_Receive() by including the header.
Check out this discussion on STM32-Community.
For software, look for the CANtact open source project on Github. It is an implementation for the STM32F042. I had to adapt the project to build it under Atollic but it was not too hard and it works. It provides a SLCAN type of interface over a virtual COM port over USB, which is very fast and convenient.
There is also CAN code for the STM32F103 (Bluepill) (Google "lawicel-slcan") but that chip is not as convenient because you cannot use both CAN and USB at the same time (they share RAM buffers) so if you want CAN, you will not have USB, and routing the CAN messages over a UART will severely limit the bandwidth. That may be OK if your entire application runs on the STM32.
as I mentioned above,
does Arduino Uno capable of running application that is taking input from sensors around 6 sensors and sending that input to a remote database through out internet by using either (Wi-Fi shield, ethernet shield)?
I am asking such a question because I am going to use it in the next semester of academic year as a part of my final year project, but I am worried that it's RAM size is not enough since it is 2KB and I need to decide either using Arduino Uno or switch to Raspberry Pi.
It should be possible, altough you may have a hard time searching for a suitable driver for your database. If using MySQL, there is already a project to do exactly what you want.
Another (more flexible) approach is to write a small PC software to receive sensor data in a simple protocol you define, and write them to the database. Run it on the database machine (or any other machine, really), and then make the Arduino communicate with your proxy software instead.
I would like to develop an application to read data from PLC machine (MELSEC-Q Series). Currently, I am reading data using kepware. However, I have to specify which PLC address I want to read in advance. I want to build my own application thus I can specify at that particular moment which PLC address I want to read. How can I do that (any programming language is OK)? Is there any module to do that?
NB:
Actually, I want a function in a programming language like:
function (Read PLC Addresses X2, Y8 .... )
{
//read value of those PLC addresses
// report to excel file
}
I am very new in this field. So, correct me if anything is wrong.
You could use MX Component by Mitsubishi which an official API for communication with MELSEC-Q Series PLC (among others). The API is basically a COM layer that implements the MELSEC Communication Protocol using sockets (TCP or UDP) or serial communication.
It is possible to use the API using any language that supports COM, such as C/C++, VB6, C# and VB.NET
You can setup predefined configurations in the same way as a Channel/Device pair in Kepware KEPServerEX or you could setup communication dynamically at runtime like you want to.
Just like Kepware KEPServerEX, the MX Component API is a commercial product.
You should be able to set-up multiple connections in Kepware, and call them as needed. In Wonderware (the HMI application I am most familiar with) each PLC then becomes a topic that you address to get the data.
Kepware has examples and sample code for VB here Kepware VB Samples
I am looking for a tutorial on how to receive an iBeacon signal with a Raspberry PI.
What I am trying to do is monitor a zone of our warehouse. Once a beacon that advertises specific information enters that zone the rasperry Pi should send a REST request to a webservice.
I've found this: Can RaspberryPi with BLE Dongle detect iBeacons? but it does not quite answer my question. Does anyone know of a good tutorial how to implement something like the above?
(the easier the better, I am not exactly a programming whiz ... :-) )
Cheers,
Vitus
My company is working on tools to make doing this easier, but we do not have a tutorial available yet. We are the ones who posted the information you referenced: Can RaspberryPi with BLE Dongle detect iBeacons?
If you want to call a ReST service when an iBeacon is detected, you can use it with the detection script we provided. As the detection script runs, it writes out the identifiers of any iBeacons it sees. What you would need to do is write a separate program that reads in the output of this script, looks for identifiers that it cares about, then calls the ReST service when it sees them.
Connecting two programs by taking the standard output of one and reading it with another is a very common programming technique on Linux. You would run our program with ibeacon_scan -b and it would output the information below:
2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6 1 6 -59
E2C56DB5-DFFB-48D2-B060-D0F5A71096E0 6 9 -55
74278BDA-B644-4520-8F0C-720EAF059935 0 73 -50
You would then read this information in with your second program line by line, parsing out the three part identifier from each line. And then call your ReST Service if the identifiers match the iBeacon you are looking for.
The specifics of how you do this depend on what programming language you want to use. You could do it in C, Ruby, Perl, Java or any other language supported by the Raspberry Pi. If you have a client library for your ReST service, you probably want to build this program in whatever language that client library uses.
Full disclosure: I am Chief Engineer for Radius Networks.
I'm using a DSP to control a sensorless brushless DC motor, The DSP is on a board which has a parallel port and a jtag connection (it's an eZdspTMS320F2812). What would be the best way to communicate between a PC application and the DSP as it was running? Ideally I'd like to have a GUI program with buttons like start, stop, accelerate, decelerate... but I've never done anything like that before. Which ports and method would be easiest to use?
Thanks
You can also use simple RS232 communications. I use always because it`s cheap and easy to implement.
The RS232 transceivers are very cheap (like MAX232 from Maxim-IC), and easy to use. Also they come in many packages like DIP or SOIC for example and can be found almost every electronic shop.
You can use any USART from your microcontroller to link with MAX232. Then, using a PC serial-usb converter (or if your PC does have a serial port it`s easier), you can use serial port programming from any programming language to develop your desktop application.
After that, all you have to do is create a protocol to exchange data between your PC programm and your DSP (some simple commands to start, stop and change motor direction for example).
Good luck in your project.
The parallel port is probably the easiest route. Depending on what OS and programming language you are using you should be able to find example code or libraries to support bi-directional communication via the parallel port. Since you have a small set of commands that you might want to send to the DSP board then you can probably just send a single character to the board for each command, e.g. 'R' = start, 'S' = stop, etc.