University Programs Community Articles

Showing results for 
Search instead for 
Did you mean: 

University Programs Community Articles

Contributor I

This project was implemented by Ioana CULIC (, PhD candidate at the Politehnica University of Bucharest, and Alexandru VOCHESCU ( as part of his bachelor thesis at the Politehnica University of Bucharest. All the contributions are open source and are part of the Tock project, available on github.

1. Context

When it comes to embedded devices applications, Real Time Operating Systems are widely used as support for running multiple concurrent applications on resource-constrained devices. However, most of the RTOSes available emphasise the efficient resource usage, while  lackin in default security mechanisms such as fault isolation.

In this context, Tock OS comes as the first operating system for embedded devices that is developed with security in mind. Tock is described as “an embedded operating system designed for running multiple concurrent, mutually distrustful applications on low-memory and low-power microcontrollers”. Tock OS implements memory isolation through the MPU (Memory Protection Unit) already existent in the ARM Cortex-M devices. It is an open-source project developed by researchers at universities such as UC Berkeley, Stanford or MIT which is written in Rust, a secure-oriented programming language which relies on compile-time memory checking. Rust supports unsafe code snippets, where the compiler does not enforce memory safety.

Architecturally speaking, Tock OS is structured on three main layers (Figure 1):

  • Core Kernel - It is written in Rust, has a small size, and its main purpose is to expose the hardware features to the Capsules. This part of the OS is considered fully trusted, so it can contain unsafe code which can dereference raw memory (extremely important in accessing the registers of the peripherals).
  • Capsules - These are written in Rust, can be of larger dimension, mostly equivalent to the linux kernel drivers. They must not contain unsafe code.
  • Processes - They can be written in any programming language (for now only C, C++ and Rust are supported). They rely heavily on the MPU.


Figure 1. The TockOS stack. (Source:

In order to extend the usage of this Operating System, we created support for a new board: the i.MX RT 1052 EVKB, which features an ARM Cortex-M7 processor with a 600 MHz frequency and up to 512 kB Tightly Coupled Memory.

2. Process overview - adding a new board to Tock OS

When we are talking about the code, the Tock OS project is structured in the following folders, which contain modules (that in Rust are called crates):


  • arch/ -  It contains the code specific to the MCU architecture such as the context switch from kernel to userspace or the interaction with the MPU.
  • boards/ - It contains the initialization and start-up code for each board that is supported by Tock. This code is used for initializing the peripherals used by the board such as UART (Universal Asynchronous Receiver-Transmitter) and the capsules exposed by the board, and in starting the kernel loop.
  • chips/ -  It contains the code that implements the hardware features in a generic way in order to be used by the capsules without depending on the board or MCU that Tock OS runs on (in Rust this feature is called implementing traits). This part of the project contains the low-level interaction with registers for peripherals such as GPIO, UART, or I2C.
  • kernel/ - It contains microcontroller-independent code. Here we can find the implementations for the process scheduler, memory management, and the structure and functions of a process. Moreover, in this part of the project we find the generic functions that need to be exported by the code for each peripheral in the chips/ folder.
  • tools/ - It contains tools used mostly for code formatting, but also tools which can be helpful in the development process.

In order to add support for a new board in Tock OS, we first have to make sure that the MCU architecture is supported by the OS by checking the arch component of the project. Otherwise, we need to port it first by creating a crate for the new architecture in the arch/ folder. After that, we need to create a new chip crate if the MCU is not supported yet (which was also the case for i.MX RT 1050 MCU). As the final step, we need to create a board crate which instantiates the modules implemented in the correspondent MCU crate. This component will also set the clock frequency for the peripherals used, load the applications from flash, and finally start the kernel loop (essentially starting the Operating System).

Last step in the process is to make the code available to use for other users, by creating a Pull Request on Tock OS github.

3. The porting process 

The porting process takes place only in the Core Kernel part of the Operating System so the code can contain unsafe sections since it is fully trusted. However, the aim is to keep the unsafe snippets to minimum.

The first thing we had to do in the porting process, since Tock OS did not support the ARM Cortex-M7 architecture was to include it as a new module. However, since the ARM Cortex-M4 was already supported, we have created the ARM Cortex-M7 crate based on it, the only major difference being that M7 supports 16 MPU regions instead of 8 (which is the case for M4).

The next step is related to the chips/ component of the project, where the MCU-specific implementations are contained. Therefore, we started implementing a few of the core features of the board as different modules in the i.MX RT 1050 MCU crate such as:

  • CCM (Clocks Controller Module), which is used for activating the clock used for the peripherals implemented by us in the porting process;
  • Iomuxc (Input Output Multiplexer Controller), used for configuring different electronical aspects of the pins exposed by the board, but also for configuring alternative functions for different hardware protocols such as I2C, UART or SPI;
  • GPIO (General Purpose Input Output), used for the interaction with the pins;
  • GPT (General Purpose Timer), used for delay functions (the function in the userspace library which uses this module is called delay_ms);
  • LPUART (Low-Power Universal Asynchronous Receiver-Transmitter), used for communication through the serial line with the PC from which the board is programmed;
  • I2C (Inter-integrated Circuit) - hardware protocol used for communicating with other devices; it can be used for testing the accelerometer/magnetometer sensor (Fxos8700) present in the i.MX RT 1052 EVKB board;
  • NVIC (Nested-Vector Interrupt Controller), a module for assigning handlers to be called by the Instruction Service Routine in the kernel when an interrupt signal appears.

The final stage of the process was to create a new crate in the boards/ folder where we instantiated the features implemented in the  i.MX RT 1050 MCU crate. This crate functions as a start-up configuration file for the Tock Operating System.

4. The result

Through this process, we managed to create a working Tock OS instance on the i.MX RT 1052 EVKB board and created a pull request on Tock OS github in order to make the code be available for everyone to use. The functionalities implemented were tested using a simple C application in userspace, with which we interact through the serial line (using the Lpuart module) and through which we can turn the User LED on or off using the GPIO module (Figure 2), or print information from the accelerometer sensor (through the I2C module).

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include <unistd.h>

#include <timer.h>

#include <led.h>

#include <ninedof.h>

#include <console.h>


static bool ninedof = false;


int main(void) {

  char c = 0;

  char str[10];

  int i = 0;

  printf("What is your name?\r\n");

  c = getch();

  while (c != 13) {

    str[i++] = c;

    c = getch();



  printf("Welcome %s!\r\n"

    "Type \"o\" to turn led on, or \"f\" to turn led off!\r\n"

    "Type \"s\" to print accelerometer data!\r\n"

    "Press \"e\" to exit!\r\n", str);

  while (1)


    c = getch();

    printf("You typed: %c!\r\n", c);

    if (c == 'o')


    else if (c == 'f')


    else if (c == 's') {

      ninedof     = driver_exists(DRIVER_NUM_NINEDOF);


      int ninedof_x = 0, ninedof_y = 0, ninedof_z = 0;

      if (ninedof) {

          ninedof_read_acceleration_sync(&ninedof_x, &ninedof_y, &ninedof_z);

          printf("FXOS8700CQ: X:               %d\r\n", ninedof_x);

          printf("FXOS8700CQ: Y:               %d\r\n", ninedof_y);

          printf("FXOS8700CQ: Z:               %d\r\n", ninedof_z);



    else if (c == 'e')








  return 0;


115804790_287117685833095_1815255548123268287_n.jpgFigure 2. LED on example.

In order to create a project using Tock OS for the i.MX RT 1052 EVKB, we need to clone the repositories for tock and libtock-c from GitHub. Afterwards, we compile an application for the userspace from the examples in libtock-c by going into the examples directory and running make in the folder of a project such as c_hello/. For the next step, we have to modify the APP variable in boards/imxrt1050-evkb/Makefile to point to the binary generated in the previous step.



After that, we run make program in the board’s folder.

In order to flash the application on the board, we need to use the MCUXpresso IDE and the SDK for the IMXRT1050 board. We import an SDK example such as Hello World in order to generate the hierarchy for the project. Next, we copy the app image from target/thumbv7em-none-eabi/debug/imxrt1050-evkb-app.axf to the Debug folder in MCU Expresso via drag and drop (Figure 3).


Figure 3. Importing the app image.

Afterwards, we modify the LinkServer in order to point to the Tock OS binary instead of pointing towards the hello_world example as depicted in figure 4.


Figure 4. Edit LinkServer.

Finally, we simply press debug in order to flash the application on the board and enjoy!

5. Future work

For the moment, we are working on the created pull request in order for it to be accepted and afterwards, we will work on exposing all the other functionalities such as SPI or Ethernet and we will enable cache for instructions and data. Furthermore, we are looking into porting the other boards in the i.MX RT family such as the i.MX RT 1060 EVKB.

When the Pull Request will be accepted, the board will appear as an experimental board supported by Tock OS, since not all features are implemented and the project is not thoroughly tested.

0 0 403
Contributor I

Jaden NewMan Early Life

Jaden Newman was born in the year 2004 on the 13th of June. She was born into the family of Vivian Newman and Jamie Newman.

At the age of 3, she started playing basketball and she grew up loving basketball.

When she became a teenager, her father became the coach of basketball in her school and he later talked her into becoming a basketball player to feel in the lapses he was missing.

Jaden have a brother who is also a basketball player and it was very easy for her to master the game and the best part of it was that, she was passionate about playing basketball.

She was later among the best basketball player female basketball player in the varsity team.

Jaden Newman

Presently, she has not received any award but with the way she is striving, she will get some awards soon.

Jaden Newman age

Jaden Newman was born on 13th of June in 2004 therefore, she is 16 years old as of 2020.

Jaden Newman Net Worth

According to legit online source, Jaden Newman is estimatedly worth $300k.

She makes her money from playing basketball.


0 0 184
Contributor III

The internal clock frequency of Kinetis chips varies due to manufacturing tolerances. A trim value is programmed into the chips to compensate for this variance and make the slow bus frequency uniform between chips.

For some inexplicable reason, this trim value is not active during debug mode. This makes developing serial and CAN applications very difficult, as the baud rates which are set are not the baud rates which are achieved. To make matters worse, if I understand the documentation correctly, the baud rate in debug mode is different from the baud rate in normal mode.

I am working with KDS and USBDM which makes a beautiful IDE and works with processor expert. Unfortunately KDS is no longer under development and S32 does not support processor expert for my chips. Porting over to a newer development environment might help with the clock frequency issues, but with existing projects and code bases that is not an attractive solution. Perhaps some of these problems do not occur with commercial software or have been resolved in MCU Expresso and S32 design studio.

So, to fix this clock issue with KDS perform the following.

Load the trim value from memory you can control


Figure 1: The processor expert tab with the processor selected

Go to the processor expert tab and click on your processor. In my case the processor is a SKEAZN64MLC2.


Figure 2: Adding code to initialize trim values from known memory locations

Maximize the component inspector so that you can see all the settings. Click on the Advanced tab, and put a check mark in the “Initialize slow trim value” box.

Clicking the “Initialize slow trim value” box writes the following code in the generated file CPU.c in order to load the trim value from addresses 0x3FE and 0x3FF.

if ( *((uint8_t*) 0x03FFU) != 0xFFU) {

ICS_C3 = *((uint8_t*) 0x03FFU);

ICS_C4 = (ICS_C4 & 0xFEU) | ((*((uint8_t*) 0x03FEU)) & 0x01U);


That part was easy.

Create linker memory description for locations 03FE and 03FF.


Figure 3: Adding a memory section for the values to be initialized.

Still in processor expert with your processor selected, go to the build options tab and select Generate linker file. If the check box for "Generate linker file" is not checked check it (after saving your linker file by checking it into git so that you can compare changes and restore any prior modifications). Add a Rom/Ram area by clicking on the “+” button—my new section is called “m_init_clks_debug”. Set the qualifier to RX so the linker knows it is for flash memory. Since memory is in 4 byte units on this chip, set it at address 0x3FC and make it 4 bytes long.

Adding the line to the ROM/RAM areas in the CPU component declares a memory location for a new section by adding the line

m_init_clks_debug (RX) : ORIGIN = 0x000003FC, LENGTH = 0x00000004

to the linker file ProcessorExpert.ld,

Initialize the memory locations.


Figure 4: Initializing the memory location values.

Go to the Build-options tab and select the filter User initialization. Click the three dots next to User data declarations to brings up a dialog where data declaration code can be written. Fill in the dialog with

const __attribute__ ((section (".init_clks_debug"))) uint8_t dbg_clk_init[4] =







to create an array "dbg_clck_init[4]" in section ".init_clks_debug" and initialize its values in memory. The value 0x9A is the trim value, which will be unique for each chip.

Code written in the “User data declarations” dialog box is written in the beginning of the CPU.c file every time the component is regenerated. If you add the code manually to the CPU.c file, the code will be erased each time the file is regenerated.

Make the ".init_clks_debug" section in the linker file.


Figure 5: Editing the processor expert linker file

I have found no way to do this through processor expert, so generate your processor expert code to add all the changes made in the earlier steps into your generated c code. Then go back to the <Processor Expert> <Build Options><Generate linker file> tab (Figure 3) and un-check the “Generate linker file” check box. This will prevent further modification of your linker file, and allow you to create the necessary section manually.

Open the linker file and add the following code to create the necessary section to put your initialized dbg_clk_init array into.

.init_clks_debug :


dbg_clk_init = .;

. = ALIGN(4);

KEEP(*(.init_clks_debug )) /* Startup code */

. = ALIGN(4);

} > m_init_clks_debug

Determine the proper trim value for your unique chip.


Figure 6: Finding the trim value

So far, it has worked for me to set a break point at the beginning of the code that was added to the Cpu.c file,

 if ( *((uint8_t*) 0x03FFU) != 0xFFU) {

ICS_C3 = *((uint8_t*) 0x03FFU);

ICS_C4 = (ICS_C4 & 0xFEU) | ((*((uint8_t*) 0x03FEU)) & 0x01U);


and to inspect the ICS.C3 and ICS.C4 registers in the EmbSys Registers tab of the debug perspective as in figure 6.

This begs the question—why was all this necessary? Before doing this work the value showing in ICS.C3 was 0x80, which may be some default? This caused to set baud rate of 36000 to give an actual baud rate of 38400 on one chip, something different on another chip. Worse yet, according to the documentation the baud rate is not the same in debug mode and normal operating mode. After making these modifications and programming the proper trim value, the set baud rate matches actual baud rate that the serial or CAN bus uses.

A further benefit is that you can program a non-standard value to set a non-standard baud rate if there is a need. From the data sheet:

ICS_C3 is automatically loaded during reset from a factory programmed location when not in a debug

mode. The factory programmed trim value adjusts the internal oscillator frequency to fint_ft as specified in

the datasheet. The user can provide a custom trim value to attain other internal reference clock

frequencies within the fint_t range. The custom trim value must be programmed into reserved flash

location 0x0000_03FF and copied to ICS_C3 during code initialization.

Each increase in the ICS.C3 setting lowers the frequency of the intermediate clock bus by approximately 100 cycles per second.

0 0 204
Contributor I

You have come to the right place to download Rocketman Sinhala Subtitles. We have created subtitles in the SRT file format, due to the subtitles file being in Srt extension, it becomes effortless to add captions to the movie. You will not have any problem in adding Rocketman (2019) Subtitles to the film. Rocketman Sinhala Subtitles Srt file encoded in the Sinhala language, due to which you will not face any problem in watching the movie.

If you do not understand the language of the film and you are bored, then you will get to download subtitles of all kinds of movies on our website.

Sometimes it is challenging to watch a movie without subtitles because we do not understand the language of the movie, due to which you cannot view the film entirely in fun. When we do not understand the language of the film, we get bored and stop watching the movie.

You Can Visit: Rocketman Sinhala Subtitles

0 0 282
Contributor IV

Hi All,

This is Mini Drum Pad build in with IMXRT1015. Also it has AFE shield board which is used for capsense buttons.

IMX RT is, using SAI to play the audio file at 16KHZ. I have created 12 samples (.wav file) and the raw data is stored in the music file. Based on the capsense button press triggering the sound effect.

Speaker I used is from Boat, it has internal battery so only thing required is to feed the Aux input from IMXRT EVK.

I felt that, button sense over I2C bit slow due to that having the limitation of playing the music as faster. Anyway its just demonstration of my concept.


This drum has 3 modes of music set. The mode can be changed with the help of mechanical switch (push button). Also the volume can be controlled via Potentiometer.

For more details checkout here

The working video is here.


Ashok R

0 0 216
Contributor I

The name palmetto bug is a very common general name, used for some species of cockroaches in the southern part of the U.S and some other bug which names are: croton bug or water bug. Sadly, the names of this bug can be complicated and misunderstood. However, any bug of the same size is referred to as these names.

Moreover, a cockroach popularly called a palmetto bug is associated with the kind of the American cockroach, with the scientific name of “Periplaneta americana“. Matured palmetto bugs are big and have wings for flight, their color is seen to be a dark brown with a creamy-colored anterior segment of the thorax accompanied with dark markings.

These bugs would rather accept soaked surroundings and are easily seen in the sewage system, gutters, trench, woodpiles, and mulch. They normally fly to the lights when dark. this specific action is unsettling for owners of the home who get in contact with the bugs when going into their homes with lights nearby in the evening.

Normally when people discuss the palmetto bug they are talking about the smoky brown cockroach, people living in rural areas have hatred for the palmetto bugs. These strong bugs can live for up to 2 or 3 months without food or water. Palmetto bugs especially the females can live for a year and in some cases longer. To read more on related topic, visit Pestclue.

Read also: Bug: Everything You Need To Know About Palmetto Bug 

What Eat Mosquitoes? Full List of Mosquito Predators

Do Squirrels Hibernate? A Detailed Insight Into Squirrel Hibernation 

Wasp vs Hornet; Facts, Differences and Comparison 

What Does Firefly Eat? Interesting Facts About Firefly Diet

Pharaoh Ants: Interesting Facts About Pharaoh Ants

Do Bedbugs Jump? The Movement of Bedbugs

Rodents; 10 Superficial Facts About Rodents

Yellow Jacket Vs Hornet; Facts, Differences and Comparison

Are Opossums Dangerous? Facts and Behavior of Opossums

Types of Cockroaches 

Green Bottle Fly: All You Need To Know About Green Bottle Fly 

How Long Do French Bulldogs Live? The Lifespan of French Bulldogs 

How Long Do Mice Live? The Lifecycle & Lifespan of Mice 

Drugstore Beetles: Facts, Infestation and How to Get Rid of it 

Sawtoothed Grain Beetles; Facts, Identification and Control 

Pill Bug; Fact, Habitat, Lifecycle, Species and Appearance 

Sow Bug; Important Facts About Sow Bug and Infestation 

Grass Spiders; All You Need To Know About Grass Spiders 

Tarantula Wasp Hawk; Everything You Need To Know 

Bumblebees vs Honey Bees; Facts, Differences, and Comparison 

The House Centipede; Facts, Benefits and How to get rid of it 

Boxelder Bug; All You Need To Know About Boxelder Bug 

Flea vs Bed Bug Bite; Facts, Comparison and Symptoms 

Squirrel Droppings: What Does Squirrel Poop Look Like? 

What do ants eat?

Fast and Safe Ways on How to Get Rid of Silverfish Bugs 

Bed Bugs vs Tick; Facts, Differences, Identification, and Prevention 

0 0 158
Contributor I

Hello Folks,

I have created project for managing I2C-bus low power LED drivers build at PCA9632 chip. (with possible modification for PCA9624,PCA9635PW,PCA9685,PCA9955B,PCA9956B).

You are able to manage chip from Raspberry. (It was tested at version 3 +). Github project contains documentation, sources and binaries. Who is interested in he is also welcome for testing of functionality and cooperative feed back.

Code is written at (python3 & adafruit library) as backend and free pascal as frontend.


Here is link to the project: GitHub link

#i2c protocol

#software engineer

#raspberry pi 3





0 0 298
Contributor III

Hello everyone,

Greetings of the day...

      we are doing the flat design with imx6ul with 2 RAMs(MT41K512M8DA-107P). So how can i configure this in barebox source. is any reference is available with 2 RAMs?

Thanks & Regards


0 0 144
Contributor I

For example, a steel detailing can be defined as a group of structural elements consisting of columns, walls, beams, flooring, plates, side wall covering members, roofing members among others. It has steel units of different sizes and types all connected by welding or bolting together.

The design engineer begins with a design drawing that describes the sizes of the steel members, the orientation, a member's position in 3D space, and how they are supposed to be related to each other. In addition to showing the paint requirements, he provides the dimensions of the building's aisle or overall space, and the floor levels. He also determines the exact content according to the benefit.

After the design drawing is complete, it is what the contractor / manufacturer / erector uses to determine everything from the overall volume of work, the quantity of material needed for each member position, the time and resources required to perform the job, the potential problem areas and the implementation difficulties, so that he can quote a fair price for project execution.

Once the project is awarded to the contractor, the next step is to push towards its execution. The earlier concept drawing is no longer useful for specific jobs, such as cutting the material to exact size, length, shape and drilling the bolt holes in the right places to connect to other members.For each structural element, the contractor needs detailed plans and needs to prepare a new set of drawings, detailing the exact shape, scale, cutting length, diameter and location of the connecting bolt holes. The new drawing must specify the exact specifications of the fixtures and positions and have the full bill of materials with a list of all the necessary materials.A latest drawing is called a drawing of a shop or a drawing of a fabrication, or drawing of a production. There is a specific identification tag, called an erection mark, which is assigned to each assembled piece after which they are transported to the construction site where they are unloaded with punched or painted identifying tags.

At this stage, a new drawing called GA drawing (general arrangement drawing) or Marking Plan or Marking Elevation is ready to show where the produced parts are located and to which other members they are related. Specialized steel detailing agencies which today use advanced modeling software are preparing these drawings expertly.Previously however, professional draftsmen painstakingly prepared them manually.

This is the entire Structural Steel Detailing cycle, which is an important and critical component of structural steel construction. It is worth noting that the ...
The Structural Steel Detailing process is time-consuming and time-consuming, with precision paramount.

A small error in these drawings & data files will lead to on-site problems during assembly and will also blow up costs if any steel component has to be re-manufactured / modified due to a design error or a thorough error.

With hundreds of skilled workers waiting at the site for the drawings with expensive equipment, drawings are always urgently needed, causing immense pressure and stress on those responsible for drawing.

0 0 139
Contributor III

开发板是imx8M mini,我们自己做的板子,使用官方镜像yocto 4.14.98,OV5640 mipi摄像头,验证及其测试:

root@imx8mmevk:~# uname -a
Linux imx8mmevk 4.14.98-imx_4.14.98_2.0.0_ga+g5d6cbea #1 SMP PREEMPT Thu Dec 12 08:23:58 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux


&i2c4 {
    clock-frequency = <100000>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_i2c4>;
    status = "okay";

    ov5640_mipi: ov5640_mipi@3c {
        compatible = "ovti,ov5640_mipi";
        reg = <0x3c>;
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_csi_pwn>, <&pinctrl_csi_rst>;
        clocks = <&clk IMX8MM_CLK_CLKO1_DIV>;
        clock-names = "csi_mclk";
        assigned-clocks = <&clk IMX8MM_CLK_CLKO1_SRC>,
                    <&clk IMX8MM_CLK_CLKO1_DIV>;
        assigned-clock-parents = <&clk IMX8MM_CLK_24M>;
                    assigned-clock-rates = <0>, <24000000>;
        csi_id = <0>;
        pwn-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
    //  rst-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
        mclk = <24000000>;
        mclk_source = <0>;
        port {
            ov5640_mipi1_ep: endpoint {

                 remote-endpoint = <&mipi1_sensor_ep>;


  │ Symbol: MXC_CAMERA_OV5640_MIPI_V2 [=y]                                  │ 
  │ Type  : tristate                                                        │ 
  │ Prompt: OmniVision ov5640 camera support using mipi                     │ 
  │   Location:                                                             │ 
  │     -> Device Drivers                                                   │ 
  │       -> Multimedia support (MEDIA_SUPPORT [=y])                        │ 
  │         -> V4L platform devices (V4L_PLATFORM_DRIVERS [=y])             │ 
  │           -> MXC Camera/V4L2 PRP Features support



root@imx8mmevk:~# dmesg |grep 5640
[    1.915242] ov5640_mipi 3-003c: No sensor reset pin available
[    1.921033] ov5640_mipi 3-003c: 3-003c supply DOVDD not found, using dummy regulator
[    1.928836] ov5640_mipi 3-003c: 3-003c supply DVDD not found, using dummy regulator
[    1.936552] ov5640_mipi 3-003c: 3-003c supply AVDD not found, using dummy regulator
[    3.103770] mxc_mipi-csi 32e30000.mipi_csi: Registered sensor subdevice: ov5640_mipi 3-003c
[    3.112716] ov5640_mipi 3-003c: Camera is found


root@imx8mmevk:~# v4l2-ctl -D -d /dev/video0 --list-formats-ext
Driver Info (not using libv4l2):[  200.736512] ov5640_mipi 3-003c: Please assign pixel format, width and height

 Driver name   : mx6s-csi
 Card type     : i.MX6S_CSI
 Bus info      : platform:32e20000.csi1_bridge
 Driver version: 4.14.98
 Capabilities  : 0x84200001
  Video Capture
  Extended Pix Format
  Device Capabilities
 Device Caps   : 0x04200001
  Video Capture
  Extended Pix Format
 Index       : 0
 Type        : Video Capture
 Pixel Format: 'YUYV'
 Name        : YUYV 4:2:2
  Size: Discrete 640x480
   Interval: Discrete 0.033s (30.000 fps)
  Size: Discrete 320x240
   Interval: Discrete 0.033s (30.000 fps)
  Size: Discrete 720x480
   Interval: Discrete 0.033s (30.000 fps)
  Size: Discrete 1280x720
   Interval: Discrete 0.033s (30.000 fps)
  Size: Discrete 1920x1080
   Interval: Discrete 0.033s (30.000 fps)
  Size: Discrete 2592x1944
   Interval: Discrete 0.067s (15.000 fps)
  Size: Discrete 0x0



root@imx8mmevk:~# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-1920,height=1080 ! waylandsink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[  291.739794] ov5640_mipi 3-003c: s_stream: 1

然后我用自己写的V4L2程序采集,这里默认是采集的是YUYV图像,640*480,保存成 test-mmap.yuv格式,当然也可以让他自动转换成RGB显示在屏幕上,不过我还没有做。

root@imx8mmevk:~# ./wx

capabilities: 84200001
driver: mx6s-csi
card: i.MX6S_CSI
bus_info: platform:32e20000.csi1_bridge
version: 4.14.98

we are here11
{ pixelformat = 'YUYV', description = 'YUYV 4:2:2' }
we are here22
************** main, line = 139
we are here33
we are here44
we are here55
[  463.023861] ov5640_mipi 3-003c: s_stream: 1
buf.index dq is 0,
[  463.204929] ov5640_mipi 3-003c: s_stream: 0

root@imx8mmevk:~# ls -l
-rwxrwxrwx 1 root root  614400 Feb 20 20:31 test-mmap.yuv
-rwxrwxrwx 1 root root   23416 Feb 20 20:28 wx



0 0 622
Contributor III

Hello, recently I have done Periph Blinky e.g. from LPCOpen library on MCUxpresso. I am using LPC1769 chip and I have toggled GPIO pin. In my case I have used buzzer pin i.e. Port 3 & Pin 25. Instead of using Timer delay I created a delay function i.e. void delay_ms(unsigned int ms). Here I am attaching the systick.c file. Hope it helps:smileyhappy:!!  

0 0 247
Contributor III

Hello everyone, I am working on MCUxpresso and using LPC1769 controller. I am done with Led blinking in MCUxpresso. I have used flash magic to flash the hex file in controller using usb to ttl. But I faced a hex file issue while doing this project. So I thought I should share this with everyone who are facing the same issue. After compiling only .axf was getting created. For creating .hex file ,you need to do following settings:

1)Go to properties---> C/C++ Build --->Settings ---> Build Steps

Now in post build steps :


arm-none-eabi-size "${BuildArtifactFileName}"

# arm-none-eabi-objcopy -v -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin"

# checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin


arm-none-eabi-size "${BuildArtifactFileName}"

# arm-none-eabi-objcopy -v -O hex "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.hex"

# checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.hex"

2) After  doing step 1, please check if axf is selected in Artifact extension as shown below:


3)For creating hex file go to Debug-->.axf file-->Right Click-->Binary Utilities-->Create hex. Now you are ready to flash! 


Also kindly check this article:MCUXpresso IDE: Creating Binary Files (S-Record, Intel Hex, Binary) 

After doing these settings I got the hex file and finally it worked!!:smileyhappy:

0 1 1,922
Contributor I

[url=]Download showbox apk latest version for android and ios for free[/url]

[url=] Showbox[/url]

[url=]tv tap[/url]

[url=] whatsapp status[/url]

0 0 122
Contributor I


0 0 129
NXP Employee
NXP Employee




Vytvorenie témy

Dokument je možné vytvoriť na internej komunite dostupnej výhradne NXP zamestnancom. Po tom čo zadanie splní všetky potrebné náležitosti, bude presunuté na verejne dostupnú komunitu.

Vzor pre vytvorenie témy*.

Forma témy

Každá téma by mala obsahovať nasledujúce oddiely

  • Thesis Title CZ/SK

               Môže obsahovať preložený názov témy.

  • Assignment

               Zadanie práce v angličtine, ktoré by malo byť logicky rozčlenené do nasledujúcich celkov:

Prečo má práca vzniknúťMotivácia
S akou problematikou je nutné sa zoznámiťAnalýza
Obvykle je potreba navrhnúť niekoľko možných riešeníNávrh
Čo bude výstupom práceImplementácia
Ako sa overí výstup práceTestovanie
  • Assignment CZ/SK

                   Môže obsahovať preložené zadanie.

    • Licence

                   Ak je potrebná špecifická licencia, môže byť definovaná v tejto sekcii. Ak nebude definovaná, bude sa počítať                s niektorov štandardnou open-source licenciou, ktorá umožní výstup práce využiť v produktoch NXP.   

    • Language

                   Zoznam jazykov, v ktorých je možné písať uvedenú prácu.

    • Leaders

    Konzultanta je možné zmieniť pomocou znaku "@" priamo v texte (ak je prihlásený na komunite, ak nie tak by sa mal registrovať - How to register in the Community (NXP employees). Každá práca musí mať priradeného aspoň jedného konzultanta, ktorý bude vedieť študentovi pomôcť so spracovaním témy.

    • Contact

    Jednotná šablóna, v ktorej je potreba zmeniť zadanie názov práce (červená farba):

    University team NXP Semiconductors CZ 

    Apply by email (link vo formáte:ázov témy)



         Dodatočné nastavenia sa nachádzajú v spodnej časti dokumentu. Tie je potreba nastaviť podľa nasledujúceho      obrázku:


          Do pola "Add additional users for approval" pridajte na schválenie svojho manažéra, team leadera, alebo ďalšie       osoby spojené s témou. Každá ďalšia úprava bude vyžadovať ich súhlas, preto volte ľudí na schválenie s       rozvahou.  

    V momente keď je zadanie hotové, je možné ho zverejniť pomocou tlačítka "Publish" - od tohto momentu je nutné schválenie každej zmeny. Pre predbežné uloženie je možné použiť "Save Draft" (ukladá to vlastnú kópiu, neprepíše vzorovú tému).


    Automatic node-placement in an oriented acyclic graph in a GUI application

    [Title CZ/SK] Automatické rozmiestnenie uzlov orientovaného acyklického grafu v grafickej aplikácii


    One of our technologies depends on displaying expansive oriented acyclic graphs. Drawing these graphs manually is time-consuming and the results are not optimal. Analyze available 'auto-layout' algorithms. Suggest one or more algorithms fit to solve the issue. Implement the selected algorithms to the specified graph format and compare the results of your work with already available manually-drawn data and existing algorithms.

    Assignment CZ/SK

    Jedna z našich technológií sa opiera o zobrazenie rozsiahlych orientovaných acyklických grafov. Ručné kreslenie týchto grafov je časovo náročné a výsledky nie sú optimálne. Analyzujte dostupné "auto-layout" algoritmy. Navrhnite jeden, prípadne niekoľko algoritmov vhodných na riešenie problému. Implementujte vybrané algoritmy pre dodaný formát grafov. Porovnajte výsledky svojej práce s už dostupnými, ručne vytvorenými, dátami a už existujúcimi algoritmami.




    Tomas Lestyan


    University team NXP Semiconductors CZ 

    Apply by email 


    *Uložením sa neprepíše vzor. Je možné zvoliť tak "Publish" ako "Save Draft"

    1 0 324
    Contributor I

    When I wanted to use CAN to wake up the MCU which was in SLEEP MODE, the HardFaultReset had been happened.

    Because of configure the register about can, such as CTRL1_PN, the offset is wrong, and cause the  incorrect address access in register area.

    In the head file of S32K144.h(from S32DS_ARM_v2018.R1), you can find the line write as uint8_t RESERVED_6[512]; .

    Compared with the datasheet, uint8_t RESERVED_6[576]; is the right offset. And then the pretended networking function can be used in my project.

    0 0 142
    Contributor I

    Using SDK drivers for LPC845 Breakout Board, this project measures the ambient light intensity by using LDR (Light Dependent Resistor). The voltage values from LDR are read through an ADC. The new LPC845 Breakout board has an SDK support which makes it a lot easier to interface an LDR for measuring light intensity compared to the conventional coding style. I have used the MCUXpresso IDE for modifying the pins and clock configuration settings.
    The project requires a resistor and LDR (Light Dependent Resistor)/Photoresistor in a resistor divider circuit as shown below:

    The value of R1 here is 4.4Kohm. 

    The output of this resistor divider circuit is connected to the assigned ADC channel. In this application, I have assigned it to the ADC0_8 channel which is the PIO0_18 (pin 3) and configured it accordingly in the software.
    Components used: LPC845 Breakout Board, Light Dependent Resistor(LDR)/Photoresistor, 2.2Kohm resistor (Quantity:2)
    LPC845 Breakout Board connections to the LDR are as shown:
    Pin NameBoard LocationPin Name
    ADC_8PIO0_18 (CN1-3)resistor divider o/p
    GNDCN1-204.4k resistor


    For this application, I have used ADC0_8 as the ADC channel which converts the LDR output analog voltage values to digital values. The values printed on the console window reflect the change in the light intensity.
    (For testing purposes, the light intensity can be changed by covering the LDR or using a cellphone flash)
    The LPC845 Breakout board has an SDK package support. I used the ADC SDK driver API in the software for interfacing the hardware components. The MCUXpresso SDK Builder has open source drivers, middleware, and reference example applications for software development. Customize and download the SDK specific to the processor and then import the zip file to the project in MCUXpresso IDE.
    The LPC845 Breakout board also features function-configurable I/O ports through a switch matrix (SWM). This makes it easier to configure pin routing and other pin electrical features. The configuration tool which is integrated into the IDE is useful for making changes in the switch matrix. The source code is auto-generated when the pin configuration or peripherals are changed.
    /* ADC_CHN8 connect to P0_18 */
    SWM_SetFixedPinSelect(SWM0, kSWM_ADC_CHN8, true);
    The source code for this application and board info for the LPC845 Breakout board can be found here.
    int main(void)
    /* Initialize board hardware. */
    /* Configure the converter and work mode. */
    /* Trigger the sequence's conversion by software */
    /* Wait for the converter to be done. */
    while (!ADC_GetChannelConversionResult(DEMO_ADC_BASE, DEMO_ADC_SAMPLE_CHANNEL_NUMBER, &adcResultInfoStruct))
    /* Display the conversion result */
    PRINTF("adcResult = %d\r\n", adcResultInfoStruct.result);
    tools lpcbreakout builder 10.2‌

    0 0 395
    Contributor I

    I have built an application to interface an accelerometer with the new LPC845 Breakout board using the I2C SDK driver.
    The accelerometer acts as an I2C slave device to the LPC845 master device. Colors on the on-board RGB LED change according to the accelerometer position.
    The accelerometer is a slave device in this application with slave address: 0x1D. The position of the board is determined by the x,y,z-axis values obtained from this slave device. The change in these x,y,z values detects the movement of the LPC845 Breakout board. I have assigned various patterns to the RGB LEDs for each movement along the y-axis. 
    Refer to the table for the hardware Connections for this application:
    The NXP MMA8652 3-axis accelerometer on the breakout board (NXP BRKT-STBC-AGM04)can be connected using I2C protocol. SCL, SDA lines and can be powered via VDD, VDDIO and GND pins.
    Connect pins of I2C master and slave as below:
    Pin NameBoard LocationPin NameBoard Location
    SCL CN1-23SCL J2-3
    GND CN1-20GND J1-5

    The LPC845 Breakout board has an SDK package support. I used the I2C SDK driver API in the software for interfacing the hardware components. The MCUXpresso SDK Builder has open source drivers, middleware, and reference example applications for software development. Customize and download the SDK specific to the processor and then import the zip file to the project in MCUXpresso IDE.
    The LPC845 Breakout board also features function-configurable I/O ports through a switch matrix (SWM). This makes it easier to configure pin routing and other pin electrical features. The configuration tool which is integrated into the IDE is useful for making changes in the switch matrix. The source code is auto-generated when the pin configuration or peripherals are changed.
    /* I2C0_SDA connect to P0_11 */
    SWM_SetFixedPinSelect(SWM0, kSWM_I2C0_SDA, true);

    /* I2C0_SCL connect to P0_10 */
    SWM_SetFixedPinSelect(SWM0, kSWM_I2C0_SCL, true);
    The source code for this application and board info for the LPC845 Breakout board can be found here.

    0 0 136
    Contributor I

    The new LPC845 breakout board has 3 onboard LEDs- Red, Green, and Blue. The brightness of these LEDs can be controlled using a PWM signal by changing the duty cycle values for each of them. As this board has an SDK support, I have used the SDK drivers to implement this application. 

    pastedImage_1.pngThe SCTimer0 generates the PWM pulse at pins which are assigned as the SCT output pins. I have assigned the PWM output to the Green LED (PIO1_0) in my source code. You can assign the PWM output to be on any other LED by using the inbuilt configuration tool which is explained later. 

    The source code below shows how to set the duty cycle percentage to increase or decrease the brightness of the assigned LED (here I have set it to 60%) 

    pwmParam.level = kSCTIMER_HighTrue;
    pwmParam.dutyCyclePercent = 60;

    Writing the source code for this application was easy as the LPC845 Breakout board has an SDK package support. I used the SCT (Sctimer) SDK driver API in the software. The MCUXpresso SDK Builder has open source drivers, middleware, and reference example applications for software development. Customize and download the SDK specific to the processor and then import the zip file to the project in MCUXpresso IDE.
    The LPC845 Breakout board also features function-configurable I/O ports through a switch matrix (SWM). This makes it easier to configure pin routing and other pin electrical features. The configuration tool which is integrated into the IDE is useful for making changes in the switch matrix. The source code is auto-generated when the pin configuration or peripherals are changed.
    /* SCT_OUT2 connect to P1_0 */
    SWM_SetMovablePinSelect(SWM0, kSWM_SCT_OUT2, kSWM_PortPin_P1_0);
    The source code for this application and board info for the LPC845 Breakout board can be found here.

    0 0 130
    Contributor II

    U-Boot banner is printed in makefile of u-boot. If you edit following lines, and execute updated u-boot , you can see desired banner.


                                     printf ' #define U_BOOT_VERSION "YOUR STRING" ' \


    Also, you can edit version, patch level, sublevel and extraversion field of u-boot which are defined at the top of makefile.

    0 0 145
    Contributor II

    I have an experience with execute u-boot standalone application on P2041RDB. Standalone addres (CONFIG_STANDALONE_LOAD_ADDR) is given 0x40000 as default. This configuration is in ./arch/powerpc/ in my model. I don't why, I cannot execute simple hello_world application following commands which locates ./examples/standalone/hello_world.c

    1. tftp 40000 hello_world.bin

        go 40000 

    2.  tftp 40000 hello_world.elf

         bootelf -p 40000 

    Both of them gives illegal insturction error.

    Then, I update standalone address to 0x23000. Following command works now!

     tftp 23000 hello_world.bin

    go 23000

    But still, bootelf command does not work..

    Maybe, you have experienced this problem.. I wish this guide helps you!

    0 0 140
    Contributor I

    英国是大多数留学生向往的留学深造目的地之一,(【联系方式QQ-1252839746】当面临诸多例如:Probation、Withdrawal、Suspension、Dismissal、等学术警告问题的时候,很多学生选择了联系我们修改成绩单达到学分GPA要求或删除学术不良记录重新回到学校。)很多留学生在美国学习后都学到了很多知识,成长为更好的自己。但是,在学习过程中,难免遇到磕磕绊绊,比如:刚来到美国会遇到Culture shock(文化冲突);刚入学会听不懂老师的授课内容;生活上出现各种不可预期的困难;mid-term和final期间没日没夜地复习。历练中,很多学生成功克服困难,顺利完成学业,但也有一部分学生面对过 停学 ( Suspension )的尴尬。不过幸好美国愿意给犯错的学生二次入学的机会,并专门针对停学及开除学生提供一个申请流程,称为 Readmission (再次申请录取)。被停学的学生可以曲线救国,最终成功回到原来的校园。

    学生被美国学校停学的理由有很多,例如作弊被抓丶GPA低丶违反校规丶代写代考被发现等等。在达到相应严重程度时,学校会给予学生短则一个季度或一个学期,长则一年甚至两年以上的停学处分。在被停学后,大多数学生都想在停学结束后重新回到原学校。那么学生就会面临 Readmission(重新申请录取/重新接纳)的情况。

    T同学是美国某大学大二的学生,在被学校停学后,选择了回国待一年。但是当T同学在结束一年的停学后,提出 Readmission 想要重回学校时,学校却拒绝了T同学的请求,T同学一头雾水。

    其实 Readmission 时,需要注意的细节有很多,但是大家往往忽略了这些重要内容。下面我们来详细讲解一下跟原学校申请再次录取的注意事项:

    首先,学生被 停学 ( Suspension )后,学校对于Readmission有着不同程度的入学要求:




    0 0 141
    Contributor IV

    When you start a board bring up activity from scratch, there are many challenges. The first of these challenges is the choice of the development environment. Is there any commercial agreement with an IDE Vendor? How flexible is debugging on the IDE and build time, code footprint after optimization etc are related concerns. If the choice is a command line based build environment, the developer is free to choose what features he needs and how easily he can customize it for his requirements.

    In case of a Graphical development environment, the IDE takes that decision for you. There are many Graphical IDEs some are commercially licensed and some are available with opensource licenses. Eclipse based IDEs are very famous across the opensource licensed Graphical IDEs.

    Not just due to its extended support, flexibility and ease of use, but also because eclipse provides SDKs to auto generate code for quick application development, many semiconductor vendors(like NXP and Infineon) are giving eclipse based IDEs While I have worked with both commercial and opensource IDEs, my personal favorite has always been an eclipse based IDE. The following are some of the cool eclipse based tools that I have worked with:

    1. Infineon's DAVE is an eclipse based IDE which auto generates MISRA C compliant c code for low level drivers which are run on bare metal as well as on an RTOS for Infineon's micro controllers. Reference.
    2. Freescale's Processor expert is an eclipse plugin which generates C code for Freescale's microcontrollers for baremetal or RTOS(MQX, FreeRTOS, uCOSII) applications. Reference

    The code generated here can be compiled with GCC(default), IAR or Tasking compilers.These are some reasons which make opensource Eclipse tools my favorite. Besides these, I always prefer my IDE to have the following features:

    1. Documentation extraction or generation from source code.
    2. Auto indentation,
    3. Auto complete option for variables, API, pre processor includes, etc.
    4. Performance analysis like code coverage
    5. Subversion control,
    6. Compare and Merge options for code references.

    Eclipse based IDEs provide very easy interface or plugins for these features. Having said that, the custom board I had to bring up is Freescale MK64FX512 based microcontroller to run applications based on Freescale MQX 4.2 RTOS. MQX has a clearly defined structure as given in the following references:

    Video Vault

    Getting Started with MQX.

    Briefly, to bring up the board with MQX RTOS:

    1. Identify the reference base board.
    2. If the base board configuration matches with your board hardware, go as is otherwise, customize the PSP(Processor Support Package) and BSP(Board Support Package) for your board and rebuild the PSP and BSP projects. The output is a library file for both these projects.
    3. Integrate the bsp.lib and psp.lib with the hello_world project given by MQX for all supported packages and configurations. While you can prepare a hello world project from scratch, picking up an existing project is easier and time saving.

    I'll make a separate note on how to customize the BSP and PSP projects for custom hardware. This note is intended to describe the steps involved in the board bring up and customizing the development environment.

    Here are the steps to bringup a Freescale K64 micro based custom board on MQX RTOS(Ver 4.2) on KDS IDE. My base board is TWR-K64. Yours can be a FRDM-K64 too which is very popular these days. I have taken the hello_world project in the example projects list for the bring up activity.

    Add the following paths in the compiler-> include settings in settings page: "${workspace_loc:/${ProjName}/Includes/debug}"







    If you have any custom code or drivers or application codes, add their paths as follows: "${workspace_loc:/${ProjName}/}"

    You can ensure that the firmware project is portable in this way as it avoids absolute links. Try to keep all all links relative to the work space or project location. Add the custom BSP and PSP libraries to Linker->Miscellaneous-> Other Objects as follows:



    Custom linker script can be added in Linker->General->Script Files as follows: "${workspace_loc:/${ProjName}//custom_linker_script.ld}"

    Now build your application, clear the compiler issues and you are ready to go! Besides this, you can also add the Doxygen, Emsys register View plugins for documentation and debugging. Visit  this reference for more details on this.

    Happy coding!

    0 0 371
    Contributor I

    业内很多工程师都在使用IAR Embedded Workbench for ARM(简称EWARM)作为ARM平台的开发工具。可您真的会用IAR EWARM吗?

    • 如何在保持代码紧凑的同时提升系统性能?

    • 如何灵活自如地安排代码和数据的存储地址?

    • 如何在程序全速运行的时候实时查看变量的数值?

    • 如何简便而准确地测量一段代码的执行时间?


    IAR EWARM网络课程


    • 胡文婷,现任IAR Systems高级工程师,具有近十年嵌入式行业设计和支持经验,专注于嵌入式开发工具相关方面的技术研究与培训。

    •  姜桥,现任麦克泰高级工程师,具有二十年嵌入式开发工具支持经验。


    1. IAR公司产品简介

    2. IDE介绍以及工程设置

    3. 编译器与优化技术

    4. 链接器与存储空间管理

    5. ARM Cortex-M调试技巧


    1. IAR编译优化实验

    2. SWO Trace实验

    3. Stack分析与保护实验









    0 0 142
    Contributor I

    对于国际留学生来说,被学校开除这点几乎是致命的,因为一旦学校将你从学校系统除名,你的I-20就会被关(terminated),学校将会给你提供15天的时间离境。如果15天只有你依然还在美国那你就已经变成一位黑户了。这将对您以后再来美留学或旅游都造成很大的不利。不过I-20被关也不代表学生不再有任何留在美国念书的机会。下面就让我来为大家介绍一下有关I-20被黑, 身份恢复 的问题。联系腾讯扣扣1252839746
    首先让我们先来了解一下什么是I-20以及它的作用有多大呢?I-20是美国移民局下发给国际留学生以及读语言学校的学生用来申请美国签证进入美国的通行证。每个申请来美留学的学生肯定都知道。 在接到学校的录取通知(offer/admission)的同时,美国学校还会给你寄来一份I-20。这张I-20上面将会记载你在该学校上学时所有的出境入境记录。 以及你在美求学阶段的身份状态。一旦I-20被美国移民局关闭,你在美的合法身份将立即失效。美国移民局会要求你在限期15天之内离境。
    首先,不要慌张, I-20被关你也不一定就会被强制遣返回国。 你只需要在短时间内在美国境内找到一所愿意接收你的学校来快速恢复你的身份,就能继续合法居留在美国生活学习。通过申请学校来恢复身份有两种途径。一种是一天快速恢复身份。这种方法简单快捷。学生当天就可以恢复合法身份。但是这一种方法要求留学生本人必须亲自去美国位于圣地亚哥的移民局一趟,才能顺利办理。另一种方法是向移民局申请重新恢复学生身份(Reinstatement) 。这种方法指的是留学生可以在I-20被关的五个月内申请美国境内学校来恢复身份。只要你的案子一经移民局受理,处于pending状态,你就可以合法在美国居住。但是,在此期间,留学生不能出境,因为一旦出境再进关时,海关会查你的I-20,但此时你原来的I-20已经过期,你就不能在入境美国了。但是,I-20被关就真的意味着你要被遣返了嘛?面对这种棘手的问题你应该怎么办呢? 联系腾讯扣扣1252839746

    0 0 149
    Contributor III

    I am working on pwm audio driver, i got some pwm driver from below link:

    GitHub - Glowforge/kernel-module-imx-pwm-audio: i.MX6 PWM audio driver 

    Please look at this driver once from above..............................

    code from driver... "sdma-params" passing from device tree
      /* Read SDMA channel number and load address */
      if (of_property_read_u32_array(pdev->dev.of_node, "sdma-params",
        sdma_params, ARRAY_SIZE(sdma_params)) == 0) {
    //  if (of_property_read_u32_array(pdev->dev.of_node, NULL,
    //    NULL,0)) {
        self->sdma_ch_num = sdma_params[0];
        self->sdma_script_origin = sdma_params[1];
      } else {
      dev_err(&pdev->dev, "sdma-params property not specified");
      goto failed_sdma_init;

    while passing the parameters of sdma(channel No. and address of sdma script load address ) in devicetree the board is not booting(its booting till bootloader), is because of channel number and address?

    &pwm3 {
            comaptible = "glowforge,imx-pwm-audio";
            pinctrl-names = "default";
            pinctrl-0 = <&pinctrl_pwm3>;
            enable-gpio = <&gpio1 4 0>;
            timer = <0x10>;
            sdma-params = <0x19 0xdc0>;
            status = "okay";

    Please suggest me how to pass these parameters through devicetree and also give some examples to understand it.

    Thanks & Regards

    Ganesh K

    0 0 126
    Contributor II

    Hi community

    For some time now we have based our product developments on Kinetis devices and uTasker and are very pleased with the simplicity and reliability that results (as well as Mark's personal support).   One of our main product development requirements was to eliminate custom host USB drivers.  Having end users install drivers is a support headache and we wanted as much plug and play as possible  With utakser, we've been using the following: 

    • USB Flash driver, 
    • USB Keyboard interface and 
    • USB serial interface.

    Note: These were just the ones we needed, utasker has many other communication options using Kinetis hardware.

    The key point is the USB serial interface does not require a special driver on Windows (like the FDTI or Prolific driver).  The utasker USB driver is a CDC generic driver which means on windows it uses the usbser.sys driver built into windows (no need for our clients to download a new driver).  

    We also tested the USB serial interface with a Rasperry Pi Zero and Chromebook.  In both cases, the USB serial port was recognized natively by the OS  and we could use off the shelf terminal programs to communicate with our product.

    Last week, we tried Android (Samsung Note 3 with OTG USB port) and it worked!  The USB serial device was recognized by Android OS and we could communicate with it.  We used the DroidTerm Andorid app which a terminal app that uses the UsbSerial library for FELHR85.  Below you can see the uTasker main menu (with some of our edits) and below is a post of our final product sending serial data into the DroidTerm.  Below that you can 

    20180702_160240 (1).jpg

    Here is a quick video of our product in operation with a Samsung Note 3 running DroidTerm:(we needed an externally powered USB hub since the Samsung Note 3 does NOT have the 500mA current supply available on typical PC USB port).


    Having native USB support for Android will mean that lots of developers interested in integrating our products.

    Thanks, uTasker (Mark B.) and Thanks Kinetis

    0 0 186
    Contributor IV

    I was surprised to learn MQX(Ver 4.2) does not support SPI Slave configuration.


    There are many workarounds in the community but the information is in bits and pieces. So i decided to write this note.

    I wanted to configure SPI0 Channel on MK64FX512VLQ12 board as Slave driven by interrupt in which can call MQX APIs. I have MQX Ver 4.2 installed.  My base BSP is derived from TWR-K64 board BSP given by MQX. IDE is KDS.f Reference hardware is TWR-K64 board. 

    The options available are:

    1. Create your own Driver. Integrate it with BSP.
    2. Integrate Processor Expert generated code to your MQX application.
    3. Integrate(Enable) Processor Expert in your MQX Application.
    4. Integrate Legacy MQX SPI(Ver 3.6 or old) driver Code to your MQX application.

    Initially I was hesitant of modifying the BSP. But now it looks to be the best option compared with the other options.

    The files needed to be modified for SPI to work as Slave are:

    1. user_config.c: I added the following lines here:   

          * Custom BSP macros.
          * */

          #define BSPCFG_ENABLE_SPI0_SLAVE 1 //SPI0 as slave.
          #define SPI0_SLAVE_POLL 0
          * @see NVIC implementation on MQX for the following
          * */

         //#define MQX_ROM_VECTORS 1

    SPI0_SLAVE_POLL is set to 1 if SPI0 channel polls for data from Master. And set to 0 if interrupt are expected on every event of SPI Master sending data.

    MQX_ROM_VECTORS is an MQX macro, define if you wish to have your ISR in the ROM address unlike the BSP registered ISR, which run from RAM. Breifly, this macro setting decide if you want to use _int_install_kernel_isr() or _int_install_isr() to register your ISR. See the following link for more details.


    2. init_bsp.c: I added the following lines here:   


    Based on user_config.h, spi0_slave_init() would be called. Its definition looks like this:

         void spi0_slave_init(void)
               SIM_MemMapPtr sim = SIM_BASE_PTR;
               PORT_MemMapPtr pctl;
              VDSPI_REG_STRUCT_PTR spi0_base = (void *)SPI0_BASE_PTR;
              /* GPIO init */
               pctl = (PORT_MemMapPtr)PORTD_BASE_PTR;
               /** 2 chipselects
                    * Select whichever is needed for a Master. */

               pctl->PCR[0] = PORT_PCR_MUX(2); /* DSPI0.PCS0 */
              pctl->PCR[1] = PORT_PCR_MUX(2); /* DSPI0.SCK */
               pctl->PCR[2] = PORT_PCR_MUX(2); /* DSPI0.SOUT */
               pctl->PCR[3] = PORT_PCR_MUX(2); /* DSPI0.SIN */
              /* Enable clock gate to DSPI0 module */
               sim->SCGC6 |= SIM_SCGC6_SPI0_MASK;
              /* MCR Configuration */
               spi0_base->MCR = 0x00; //Overwrite the Default value of MCR.
              spi0_base->MCR |= DSPI_MCR_ROOE_MASK ;
              spi0_base->CTAR[0] = DSPI_CTAR_FMSZ(15); //frame size = 16 bits.
               spi0_base->RSER &= ~(DSPI_SR_TFFF_MASK); //TFFF flag generates Interrupt requests.
              /* Install Interrupts to BSP */
               if (SPI0_SLAVE_POLL == 0)
                         spi0_base->RSER |= DSPI_RSER_TCF_RE_MASK; //generate Transmission complete requests.

    This definition is in a new file I added to BSP. 

    3. vectors.c: Replaced DEFAULT_VECTOR with spi0_slave_isr(my custom ISR) in __vector_table at SPI0_ISR location. It originally looked like this: 

      DEFAULT_VECTOR, /* 0x2A 0x000000A8 - ivINT_SPI0 */

    Now its like this:

         spi0_slave_isr, /* 0x2A 0x000000A8 - ivINT_SPI0

    This is useful if you are running the ISR from ROM. If you are registering your ISR to MQX, with will be over written. If ISR is not registered to MQX, then MQX APIs(like signalling events or posting semaphore) couldn't be used. So make your choice wisely.

    4. <>_ISR.c: This file contains is my custom ISR handler for SPI0 interrupts which occur when data is received on SPI0 channel. This is file is part of my MQX application project and not BSP. The ISR looks as follows:

         #if (MQX_ROM_VECTORS == 1) //if bypassing kernel(BSP's) ISRs
          void spi0_slave_isr(void)
          void spi0_slave_isr(void * parameter)
          (void)parameter; //to satisify compiler.
              static volatile uint8_t * r_buf; //= spi_slave_buffer.r_buf;
               static volatile uint8_t * w_buf; // = spi_slave_buffer.w_buf;
               static volatile uint8_t len; // = spi_slave_buffer.len_buf;


               if((spi0_base->SR & DSPI_SR_RFDF_MASK) == DSPI_SR_RFDF_MASK)
               {//Read RX FIFO
                    test_flag |= SPI_RX_ISR;
                    spi0_base->SR |= DSPI_SR_RFDF_MASK; /* clear the interrupt flag*/
               else if((spi0_base->SR & DSPI_SR_TCF_MASK) == DSPI_SR_TCF_MASK)
               {//Transfer Complete Flag, Write to TX FIFO now
                    test_flag |= SPI_TX_ISR;
                    spi0_base->SR |= DSPI_SR_TCF_MASK; /* clear the interrupt flag*/
              if (_lwevent_set(&lwevent_spi_slave, 0x01) == MQX_OK)

    There is a task which is blocked waiting for the event it looks something like this:   

    if ((test_flag & SPI_RX_ISR) == SPI_RX_ISR)
               test_flag &= ~SPI_RX_ISR;
               spi_slave_buffer.r_buf[0] = (uint8_t)(DSPI_POPR_RXDATA_GET(spi0_base->POPR) & 0x00FF);
               spi_slave_buffer.r_buf[1] = (uint8_t)((DSPI_POPR_RXDATA_GET(spi0_base->POPR) >> 8) & 0x00FF);
               printf("\treceived 0x%x 0x%x\n", spi_slave_buffer.r_buf[0], spi_slave_buffer.r_buf[1]);

               res = spi_slave_buffer.r_buf[1];
               res |= (((uint32_t )spi_slave_buffer.r_buf[0]) << 8);
               spi0_base->SR |= DSPI_SR_TCF_MASK; //clear the TCF Flag.
               spi0_base->PUSHR = res; //write the data
          else if((test_flag & SPI_TX_ISR) == SPI_TX_ISR)
               test_flag &= ~SPI_TX_ISR;
              res = 0;
              while (spi_slave_buffer.len_buf > res)
                    spi0_base->PUSHR = spi_slave_buffer.w_buf[res];
               printf("\ttransmission complete\n");
               printf("\tSomething's wrong with SPI0_Slave!!\n");

    I have tried this ISR be registering it to MQX as well as running it from ROM directly. If you want to run the ISR from ROM table you need to remove MQX APIs and ensure proper synchronization between ISR and the tasks(this is removed here for brevity).

    With this, you are ready to go! To conclude, modifying the BSP for an interrupt driven SPI Slave driver is easier than any other option. Also there is no other documented description available. I had tried the other 3 options I mentioned at the beginning of this note. But ended up in loosing lot of time and no logical conclusion. Its unfortunate that MQX has not closed this issue which has been existing and known to them for so long.

    Hope this helps.

    PS: I have removed some of the lines for brevity and to keep the note simple. Don't panic!

    Happy hacking!


    1 0 562
    Contributor II

    us the tile, I use molloc function sucessfuly in S12G128 mcu。

    and this way solve one bug that my code will stop at a  not certern position, because of the use of RAM.

    Because , I just use a  buf[384] way for example, and so total RAM size is reduced. 

    But after use molloc way, this question is solved .

    0 0 142