This section refers to the following sample application(s):
03-radioTest
This application is new to OCSDK 1.2.0
The OCSDK stack provides APIs for testing the radio - typically used for top-level assembly testing, and radio certification testing.
The 03-radioTest Sample Application
The application provides 3 CLI functions (available by typing help
) for radio testing:
initPer
- sets the initial period, in ns. By default, it is set toDN_PWM_8P9MS
(8.9 ms). Cannot be called when the PWM is open.initDuty
- sets the initial duty cycle, expressed as the asserted portion of the period in ns.openPWM
- opens theDN_PWM_DEV_ID
device (PWM0, LTC5800 pin 49). The device must be opened before enabling/disabling the PWM.enablePWM
- enables the PWM signal output on PWM0.disablePWM
- disables the PWM signal output on PWM0setDuty
- sets the current duty cycle, expressed as the asserted portion of the period in ns.closePWM
- closes the pwm device and disable output. The PWM must be closed before changing the period.
It also provides a reset
command for easily resetting the part.
Each CLI command prints a confirmation:
Implementation Details
The 03-radioTest
sample application uses the Helper Modules to initialize the CLI Module and for interaction with the local interface. It passes JOIN_NO
in the fJoin
flag when initializing the local module in the loc_task_init()
to prevent the local module from attempting to join, as the radio can only be tested when the mote is in either the idle or radioTest state.