Power

Voltage values can be read using the basic sensor driver on the firefly2_2 board. The micaZ needs this driver to be ported before voltage monitoring is possible. This page is missing information about how the voltage is read using the cc2420 radio and hence some care needs to be taken when using the sensor driver. This documentation will be updated shortly.

Power management is handled automatically in the sense that whenever Nano-RK is idle, the cpu is automatically put into a power down state. This power management logic can be found in the idle task. The scheduler will automatically wake the system up slightly before any task that needs to execute.

uint8_t nrk_voltage_status( void )

This function returns 1 if the voltage is high enough to correctly operate the radio, and 0 otherwise. This function is faster than calling nrk_voltage_value().

uint8_t nrk_voltage_value( void )

This function returns the current voltage value multiplied by 10. For instance 34 is equivalent to 3.4 volts. [TO BE IMPLEMENTED]

void nrk_sleep(void)

This function is for internal kernel use only and will change the state of the CPU into a low power mode that can only be woken up from an external timer! From within a task, the user should use a wait_until function to suspend execution. Power management is taken care off by the idle task. Calling nrk_sleep() from within a task will most likely violate a time reserve.

void nrk_idle(void)

This function is for internal kernel use only and will change the state of the CPU into a low power mode while keeping peripherals running. From within a task, the user should use a wait_until function to suspend execution. Power management is taken care off by the idle task. Calling nrk_sleep() from within a task will most likely violate a time reserve.

| Contents |