board_info.h File Reference

Detailed Description

#include <stdint.h>
#include <string.h>
#include "board.h"
#include "periph_conf.h"
#include "timex.h"
+ Include dependency graph for board_info.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

OpenWSN interrupt handling wrappers

#define INTERRUPT_DECLARATION()   unsigned irq_state;
 
#define DISABLE_INTERRUPTS()   irq_state = irq_disable();
 
#define ENABLE_INTERRUPTS()   irq_restore(irq_state);
 
#define SCHEDULER_WAKEUP()   /* unused by RIOT */
 
#define SCHEDULER_ENABLE_INTERRUPT()   /* unused by RIOT */
 

OpenWSN platform dependent definitions

#define PORT_TIMER_WIDTH   uint32_t
 
#define PORT_RADIOTIMER_WIDTH   uint32_t
 
#define PORT_SIGNED_INT_WIDTH   int32_t
 
#define SCTIMER_FREQUENCY   (32768U)
 
#define PORT_TICS_PER_MS   (SCTIMER_FREQUENCY / MS_PER_SEC)
 
#define PORT_US_PER_TICK   (US_PER_SEC / SCTIMER_FREQUENCY)
 

OpenWSN IEEE802154E timings

Note
These parameters are BOARD and CPU specific. Values can't be taken directly from OpenWSN since they do not necessarily use the same BSP configuration (timers, clock speed, etc.) For precise synchronization these values should be measured and tuned for every BOARD. To understand the relationship between these values and OpenWSN state machine as well as how they can be measured refer to:
#define SLOTDURATION   20 /* in milliseconds */
 
#define PORT_TsSlotDuration   ((SCTIMER_FREQUENCY * SLOTDURATION) / MS_PER_SEC)
 
#define PORT_maxTxDataPrepare   (3355 / PORT_US_PER_TICK ) /* ~110 ticks at @32768Hz */
 
#define PORT_maxRxAckPrepare   (610 / PORT_US_PER_TICK ) /* ~20 ticks at @32768Hz */
 
#define PORT_maxRxDataPrepare   (1000 / PORT_US_PER_TICK ) /* ~33 ticks at@32768Hz */
 
#define PORT_maxTxAckPrepare   (1525 / PORT_US_PER_TICK ) /* ~50 ticks at@32768Hz */
 
#define PORT_delayTx   (300 / PORT_US_PER_TICK ) /* ~10 ticks at@32768Hz */
 
#define PORT_delayRx   (0 / PORT_US_PER_TICK ) /* ~0 ticks at@32768Hz */
 

Adaptive sync accuracy

     Used for synchronization in heterogeneous networks (different BOARDs)
     Not supported yet, dummy value needs to be provided.
#define SYNC_ACCURACY   (1) /* ticks */
 

Macro Definition Documentation

◆ DISABLE_INTERRUPTS

#define DISABLE_INTERRUPTS ( )    irq_state = irq_disable();

Definition at line 49 of file board_info.h.

◆ ENABLE_INTERRUPTS

#define ENABLE_INTERRUPTS ( )    irq_restore(irq_state);

Definition at line 50 of file board_info.h.

◆ INTERRUPT_DECLARATION

#define INTERRUPT_DECLARATION ( )    unsigned irq_state;

Definition at line 48 of file board_info.h.

◆ PORT_delayRx

#define PORT_delayRx   (0 / PORT_US_PER_TICK ) /* ~0 ticks at@32768Hz */

Definition at line 127 of file board_info.h.

◆ PORT_delayTx

#define PORT_delayTx   (300 / PORT_US_PER_TICK ) /* ~10 ticks at@32768Hz */

Definition at line 124 of file board_info.h.

◆ PORT_maxRxAckPrepare

#define PORT_maxRxAckPrepare   (610 / PORT_US_PER_TICK ) /* ~20 ticks at @32768Hz */

Definition at line 113 of file board_info.h.

◆ PORT_maxRxDataPrepare

#define PORT_maxRxDataPrepare   (1000 / PORT_US_PER_TICK ) /* ~33 ticks at@32768Hz */

Definition at line 116 of file board_info.h.

◆ PORT_maxTxAckPrepare

#define PORT_maxTxAckPrepare   (1525 / PORT_US_PER_TICK ) /* ~50 ticks at@32768Hz */

Definition at line 119 of file board_info.h.

◆ PORT_maxTxDataPrepare

#define PORT_maxTxDataPrepare   (3355 / PORT_US_PER_TICK ) /* ~110 ticks at @32768Hz */

Definition at line 110 of file board_info.h.

◆ PORT_RADIOTIMER_WIDTH

#define PORT_RADIOTIMER_WIDTH   uint32_t

Definition at line 63 of file board_info.h.

◆ PORT_SIGNED_INT_WIDTH

#define PORT_SIGNED_INT_WIDTH   int32_t

Definition at line 71 of file board_info.h.

◆ PORT_TICS_PER_MS

#define PORT_TICS_PER_MS   (SCTIMER_FREQUENCY / MS_PER_SEC)

Definition at line 77 of file board_info.h.

◆ PORT_TIMER_WIDTH

#define PORT_TIMER_WIDTH   uint32_t

Definition at line 62 of file board_info.h.

◆ PORT_TsSlotDuration

#define PORT_TsSlotDuration   ((SCTIMER_FREQUENCY * SLOTDURATION) / MS_PER_SEC)

Definition at line 105 of file board_info.h.

◆ PORT_US_PER_TICK

#define PORT_US_PER_TICK   (US_PER_SEC / SCTIMER_FREQUENCY)

Definition at line 79 of file board_info.h.

◆ SCHEDULER_ENABLE_INTERRUPT

#define SCHEDULER_ENABLE_INTERRUPT ( )    /* unused by RIOT */

Definition at line 52 of file board_info.h.

◆ SCHEDULER_WAKEUP

#define SCHEDULER_WAKEUP ( )    /* unused by RIOT */

Definition at line 51 of file board_info.h.

◆ SCTIMER_FREQUENCY

#define SCTIMER_FREQUENCY   (32768U)

Definition at line 74 of file board_info.h.

◆ SLOTDURATION

#define SLOTDURATION   20 /* in milliseconds */

Definition at line 100 of file board_info.h.

◆ SYNC_ACCURACY

#define SYNC_ACCURACY   (1) /* ticks */

Definition at line 141 of file board_info.h.