SinelaboreRT Header Logo

SinelaboreRT

As simple as possible, but not any simpler!

User Tools

Site Tools


wiki:news:02jan2015

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
wiki:news:02jan2015 [2015/05/14 15:57] – [How to treat with longer lasting tasks] pmuellerwiki:news:02jan2015 [2023/03/12 17:49] webmin
Line 14: Line 14:
 The following example is based on a small MSP430F1232 header board with just 256 bytes of RAM and 8K of program memory. For the development the Code Composer Studio from TI was used. At the end the program needs <2k Flash and 182 bytes RAM incl. stack. The following block diagram shows the controller with its I/O connections. The following example is based on a small MSP430F1232 header board with just 256 bytes of RAM and 8K of program memory. For the development the Code Composer Studio from TI was used. At the end the program needs <2k Flash and 182 bytes RAM incl. stack. The following block diagram shows the controller with its I/O connections.
  
-{{ :wiki:news:jan2015_schematics.png?nolink |}}+{{ :wiki:news:jan2015_schematics.svg?nolink |}}
 Figure 1: MSP430F1232 block diagram Figure 1: MSP430F1232 block diagram
  
Line 192: Line 192:
 Execution time for handling events should be as short as possible. Longer lasting tasks should be split into chunks. Take the temperature measurement as an example. The temperature sensor TMP100 requires about 320ms conversion time according to the data sheet. The uC shouldn't wait and burn CPU cycles but either wait in low-power mode or process other events. This can easily be done by starting the conversion in one state (''Step1'') and then start a timer and enter low-power mode. If the timer fires we pick-up the conversion result (''Step2'') and process it further. Execution time for handling events should be as short as possible. Longer lasting tasks should be split into chunks. Take the temperature measurement as an example. The temperature sensor TMP100 requires about 320ms conversion time according to the data sheet. The uC shouldn't wait and burn CPU cycles but either wait in low-power mode or process other events. This can easily be done by starting the conversion in one state (''Step1'') and then start a timer and enter low-power mode. If the timer fires we pick-up the conversion result (''Step2'') and process it further.
  
-Another example is the wake-up procedure of the radio. After finishing low-power mode it takes a while before it is ready. Readiness is signalled via a transition of the RTS pin from high to low. After switching on the radio in state ''Step2a'' the level change crenate an irq and sends the event ''evFallingEdgeRTS'' +Another example is the wake-up procedure of the radio. After finishing low-power mode it takes a while before it is ready. Readiness is signalled via a transition of the RTS pin from high to low. After switching on the radio in state ''Step2a'' we enter low-power mode again. The level change creates an irq and sends the event ''evFallingEdgeRTS''Now the radio is ready to transmit data. 
 ===== Object Diagram ===== ===== Object Diagram =====
 The software design  is shown in the next figure as UML object diagram. You can clearly see how the ''queues decouple the event sources from the event consumers''. The main-loop serves as event dispatcher being only active if events are available in one of the queues. The main loop can also be used to prioritize one state machine over an other or ensure the order in which state machines are executed. The software design  is shown in the next figure as UML object diagram. You can clearly see how the ''queues decouple the event sources from the event consumers''. The main-loop serves as event dispatcher being only active if events are available in one of the queues. The main loop can also be used to prioritize one state machine over an other or ensure the order in which state machines are executed.
Line 218: Line 218:
 Peter Mueller Peter Mueller
  
-{(rater>id=01012015|name=How do you like this article?|type=rate)} 
-~~DISCUSSION|Leave your comments~~ 
    
 +{{tag>[MSP430 Application_Example]}}
wiki/news/02jan2015.txt · Last modified: 2023/03/12 17:50 by webmin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki