Contiki-NG
Modules | Files | Functions
TI SimpleLink CC13xx/CC26xx platform

The order of which these header files are included is important in order for the configurations to be correctly set. More...

Modules

 CC13xx/CC26xx Battery Monitor sensor driver.
 Driver for the on-chip battery voltage and chip temperature sensor.
 
 LaunchPad peripherals
 Defines related to LaunchPad peripherals.
 
 Sensortag peripherals
 Defines related to configuring SensorTag peripherals.
 
 SmartRF06 Evaluation Board peripherals
 
   Defines related to configuring SmartRF06 EB's peripherals.

 

Files

file  dbg-arch.c
 Implementation of the dbg module for CC13xx/CC26xx, used by stdio.
 
 
 

Functions

int dbg_putchar (int c)
 Print a character to debug output. More...
 
unsigned int dbg_send_bytes (const unsigned char *seq, unsigned int len)
 Print a stream of bytes. More...
 
void platform_init_stage_one (void)
 Basic (Stage 1) platform driver initialisation. More...
 
void platform_init_stage_two (void)
 Stage 2 of platform driver initialisation. More...
 
void platform_init_stage_three (void)
 Final stage of platform driver initialisation. More...
 
void platform_idle (void)
 The platform's idle/sleep function. More...
 

Detailed Description

The order of which these header files are included is important in order for the configurations to be correctly set.

This has to do with some slight unfortunate configuration dependencies of the board file.

Function Documentation

◆ dbg_putchar()

int dbg_putchar ( int  c)

Print a character to debug output.

Parameters
cCharacter to print
Returns
Printed character

Definition at line 51 of file dbg-arch.c.

◆ dbg_send_bytes()

unsigned int dbg_send_bytes ( const unsigned char *  seq,
unsigned int  len 
)

Print a stream of bytes.

Parameters
seqA pointer to the stream
lenThe number of bytes to print
Returns
The number of printed bytes

Definition at line 65 of file dbg-arch.c.

◆ platform_idle()

void platform_idle ( void  )

The platform's idle/sleep function.

This function will be called as part of the main loop after all events have been serviced. This is where you will normally put the device in a low-power state. Waking up from this state and tidying up the hardware is the port's responsibility.

It is the port developer's responsibility to implement this function.

Definition at line 269 of file platform.c.

References clock_arch_enter_idle(), clock_arch_exit_idle(), and watchdog_periodic().

◆ platform_init_stage_one()

void platform_init_stage_one ( void  )

Basic (Stage 1) platform driver initialisation.

This function will get called early on in the Contiki-NG boot sequence.

In this function, the platform should initialise all core device drivers. For example, this is where you will normally want to initialise hardware timers/clocks, GPIO, LEDS. Normally this function will also enable the MCU's global interrupt.

The Contiki-NG process scheduler, software clocks and timers will not be running yet, so any platform drivers that rely on it should not be initialised here. Instead, they should be initialised in platform_init_stage_two() or in platform_init_stage_three()

It is the port developer's responsibility to implement this function.

See also
platform_init_stage_two()
platform_init_stage_three()

Definition at line 146 of file platform.c.

◆ platform_init_stage_three()

void platform_init_stage_three ( void  )

Final stage of platform driver initialisation.

Initialisation of platform-specific drivers that require networking to be running. This is also a good place to initialise sensor drivers.

When this function returns, the main routine will assume that the hardware is fully initialised.

It is the port developer's responsibility to implement this function.

See also
platform_init_stage_one()
platform_init_stage_two()

Definition at line 227 of file platform.c.

References rf_ble_beacond_init().

◆ platform_init_stage_two()

void platform_init_stage_two ( void  )

Stage 2 of platform driver initialisation.

This function will be called by the Contiki-NG boot sequence after parts of the core have been initialised. More specifically, when this function gets called, the following modules will be running:

  • Software clock
  • Process scheduler
  • Event timer (etimer)
  • Callback timer (ctimer)
  • rtimer
  • Energest (if enabled)

Therefore, any platform driver that relies on any of the above modules should be initialised here or in platform_init_stage_three(), but not in platform_init_stage_one()

The Contiki-NG network stack will not be running yet, so any platform drivers that rely on networking should not be initialised here.

When this function returns, the main routine will assume that the platform has enabled character I/O and can print to console. When this function returns, main() will attempt to initialise the network stack. For this to work properly, this function should also populate linkaddr_node_addr.

It is the port developer's responsibility to implement this function.

See also
platform_init_stage_one()
platform_init_stage_three()

Definition at line 198 of file platform.c.