My personal experience and Contiki OS acquaintance

Early into the community, I am a secondary vocational school students, it is a hardware engineer, (emphasis on it). I remember entering the work is time, because the development department boss is my hometown, a few years later to go to work every day, work together, play together after work. Through this fellow, I first met 99 SE software, and C51 microcontroller, it can be considered someone helped me.

 

99 SE regarded as self-learned, of course, and now has been using Altium Designer Summer 09. continue recalls that when, after a lot of access, but also know the PIC, STM32, AVR, domestic co Taihe STC51 and so on, through the ideological struggle, I chose PIC. . . Back 2 years to 4 years time, off and on learning PIC microcontroller, with the compilation of the beginning, really tired! Did not make anything to, not how to learn, painted himself during development boards and emulators, to spend time and money but also full of big, the book is also a pile of books to them, also start with three simulators, for PIC, I do not want to say, that much is tears. . .

Turn turning point, because I was playing the first single-chip PIC, newly received from another microcontroller, it is difficult to tell the truth, why? School assembly Yeah, brother! Finally, he spent thousands of money to training institutions, while working to learn the C language, because no contact before the C language, there is no concept, remember to ask the teacher: "? Teacher, what is the complex operation, what does this mean" ha ha, is not it silly?

 

C language be learned, but not very proficient in simple, can use some so-so. Here virtually opened up another world again, C language is a universal language that can be used with any microcontroller programming, then immediately transferred to STM32 war camp, because the embedded STM32 domestic teaching of 'punctuality atom' and 'Wildfire' embedded teaching, information have a lot, and must be more people, some problems can Baidu, you can copy to verify, reducing the novice like me entry requirements.

 

Now in for! Say now, and where the process is not cost any more, CONTIKI 3.0, is the latest official. I just want to get proficient Contiki OS operating system, with an RF SOC chip applications together, this is my ultimate goal. Before writing, I have successfully CONTIKI OS ported to the STM8 and STM32 chip, and such clok.c, when CONTIKI the clok.c displaced success, OS there is a heartbeat clock, as time and is ready for use etime

As etime:

/*******************************************************************************

                                     process1                                                           

*******************************************************************************/

struct etimer timeout1; // declare ETMIER event 

PROCESS (hello_world_process1, "Hello world process1"); // application threads process1

 

PROCESS_THREAD (hello_world_process1, ev, data) // function body processes 1    

{     

      PROCESS_BEGIN (); // start     

      etimer_set (& timeout1, CLOCK_SECOND * 1/2); // 0.5S time event    

      while(1)     {        

                        PROCESS_WAIT_EVENT (); // wait for events        

                       if (ev == PROCESS_EVENT_TIMER) {// If the event occurs EV  

                       printf ( "\ nprocess1 \ r \ n"); // printf information to be ported good printf function, in order to have the output                          

                       }//if

      etimer_reset (& timeout1); // reset time, cycle 

                      }//while(1)

     PROCESS_END (); // End

}//PROCESS_THREAD

 

In fact, I applied three etime event, testing, 0.1S 0.5S 3.0S, through an oscilloscope to test, it is still quite accurate. Because the pre-transplant, online tutorials are more and more people online searching for a bit, I will not repeat here the words fee. We are here today, to be continued in. . . .

 

Finally, try can upload pictures.

 

Guess you like

Origin www.cnblogs.com/lijianGX/p/11199010.html