Data Structures | Typedefs | Functions
NoRTOS.h File Reference

Detailed Description

NoRTOS framework module.


The NoRTOS header file should be included in an application as follows:

#include <NoRTOS.h>

Overview

The NoRTOS framework module controls various aspects of the application's behavior with respect to the TI Driver interfaces that are used by the application.

Some TI Drivers make use of an internal Clock module that offers timing services to the drivers, based on a Clock "tick" which operates at a frequency based on a configured period. This period can be configured per application requirements through the NoRTOS module, although the default setting might be required by certain TI Drivers that assume a certain Clock tick frequency.

Some TI Drivers make use of an internal Swi (Software interrupt) module that offers a scheduling paradigm that lies between an application's 'main' thread and hardware interrupts. The internal Swi implementation utilizes a software-triggered-only hardware interrupt for achieving this mid-level scheduling paradigm. This hardware interrupt can be configured per application requirements through the NoRTOS module, although the default setting is likely what should be used.

Some TI Drivers will "suspend" the application's operation until a certain event occurs. When an application is running in the NoRTOS framework there are no other "threads" to run when the 'main' thread becomes suspended, which in essence implies that the application has entered an 'idle' mode. An 'idle callback' function is called when this 'idle' mode has been entered. This callback function can be configured per the application requirements through the NoRTOS module, although the default setting is likely what should be used.

Usage

The NoRTOS module contains the following APIs:

NoRTOS Framework Configuration

The NoRTOS framework utilizes a few settings that the application should be able to control so as to accommodate the unique needs of the application or the system upon which the application runs. It is expected that the default values of these settings will suffice for the majority of applications using the NoRTOS framework. These default values should be of no concern to most applications since the aspects they control are internal to the TI Drivers' operation, but system requirements or other code that is being integrated with the application could require different values. The NoRTOS configuration functions offer this capability to the application. Please refer to the documentation for the NoRTOS_Config structure for details on each configuration element.

Starting the NoRTOS framework operation

Realtime systems often require precise timing when enabling certain aspects of the system. If some part of the system is enabled too early then other parts of the system may not operate correctly. Certain system elements need to be setup and initialized before other elements will operate correctly.

The NoRTOS_start() API allows the application to control when the system as a whole should be "started". NoRTOS_start() must be called for the system to start, and should be called after all TI Driver and peripheral initialization has been performed.

Example usage

#include <NoRTOS.h>
int main(int argc, char *argv[])
{
// Get current values of all configuration settings
// Change config settings we want to change while leaving other
// settings at their default values ...
// Change system "tick" frequency to 10,000 Hz
cfg.clockTickPeriod = 100;
// Change interrupt used for Swi scheduling to 11 (SVCall)
cfg.swiIntNum = 11;
// Affect the changes
`perform board and driver initialization`;
// Start NoRTOS
// Call mainThread function
mainThread(NULL);
}

Go to the source code of this file.

Data Structures

struct  _NoRTOS_Config
 NoRTOS framework global configuration. More...
 

Typedefs

typedef struct _NoRTOS_Config NoRTOS_Config
 NoRTOS framework global configuration. More...
 

Functions

void NoRTOS_getConfig (NoRTOS_Config *cfg)
 Function to retrieve current NoRTOS configuration values. More...
 
void NoRTOS_setConfig (NoRTOS_Config *cfg)
 Function to set or modify NoRTOS configuration values. More...
 
void NoRTOS_start ()
 

Typedef Documentation

§ NoRTOS_Config

typedef struct _NoRTOS_Config NoRTOS_Config

NoRTOS framework global configuration.

The NoRTOS_Config structure contains a set of values utilized by the NoRTOS framework.

The NoRTOS_getConfig() API can be used to retrieve the current settings. When changing one or more of these settings, a NoRTOS_Config structure should first be populated with the current settings by calling NoRTOS_getConfig(), after which the particular setting(s) that needs to be changed should be set and given to the NoRTOS framework by calling NoRTOS_setConfig().

Function Documentation

§ NoRTOS_getConfig()

void NoRTOS_getConfig ( NoRTOS_Config cfg)

Function to retrieve current NoRTOS configuration values.

Parameters
cfgPointer to a NoRTOS_Config structure in which to store the current configuration values

§ NoRTOS_setConfig()

void NoRTOS_setConfig ( NoRTOS_Config cfg)

Function to set or modify NoRTOS configuration values.

Parameters
cfgPointer to a NoRTOS_Config structure from which NoRTOS configuration values are set

§ NoRTOS_start()

void NoRTOS_start ( )
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale