HOW TO PUT THE MTCDP/MT100EOCG IN LOW POWER MODE

ATTENTION:----------i. All the current measurement was based on the MT100EOCG.ii. Item # 3 will not applied to -H5 radio.iii. Item # 4, for the MTCDP, the led can be turn off by issuing the following command:echo 0 > /sys/devices/platform/mtcdp/led-sdk-becho 0 > /sys/devices/platform/mtcdp/led-sdk-cecho 0 > /sys/devices/platform/mtcdp/led-sdk-decho 0 > /sys/devices/platform/mtcdp/led-sdk-e-----------------------------------------------------------1. The MTCDP/MT100EOG can be put into two low power modes:a. standby mode. (60ma) (MT100EOCG)b. mem mode. (38ma) (MT100EOCG)*Notes: In standby mode the PLLs of the AT91SAM9G20 are still running, in power-down or mem mode the PLLs and the 18.432 MHz crystal is shut off.In practice this has some effect with which interrupts the device can wakeup. For example in standby mode you can wake up your device by typing a character on the serial console.In power-down or mem mode this will not work, because without PLL you will not have a correct baudrate. So, a reset is needed for waking up from mem mode or setting up a timer using the wake alarm of the RTC.2. An example of how to put your MT100EOCG in a standby mode and wake it up using the serial port console (ttyS0).*Plug in your 3pin debug cable and at the prompt type:echo enabled > /sys/devices/platform/atmel_usart.0/tty/ttyS0/power/wakeup[Enter]*Enable ttyS0 port to wake up.echo standby > /sys/power/state[Enter]*Put the processor in stand by mode.Now, you can just hit a space bar or Enter key to wake it up.Another example, you can wake up using the rtc timer by typing at the prompt:echo > /sys/devices/platform/at91_rtt.0/rtc/rtc0/wakealarm[Enter]*Clear the value.echo +20 > /sys/devices/platform/at91_rtt.0/rtc/rtc0/wakealarm[Enter]*You can either write a value from seconds elapsed since epoch (1.1.1970) or a value of seconds from now.echo mem > /sys/power/state[Enter]*Put the processor in mem mode.*Now, the device will wake up after the timer is expired (20secs).WARING: The holding_radio_reset_low function will not work with -H5 radio.3. To setup to hold the radio reset line to low indefinitely until you send a command to turn it back on hi, do the following:a. Download the mts_io.c file from the following:--> https://webfiles.multitech.com/resolutions/resnum/5043346/mts_io.cA couple of functions have been added into this file to do the job. The name of the function is: holding_radio_reset_low.Go to your: corecdp-2.0.2/sources folder on your PC development machine and find the file:git_git.multitech.net.cdp-io-controller.git_v0.5.1.tar.gzDouble click on it and go to /./git/io-module/ folder and delete the file: mts_io.cThen add the new mts_io.c (see download link above) to it.Exit out to your /corecdp-2.0.0/ folder.Type: source env-oe.shType: bitbake mts-io -c cleanType: bitbake mts-io -c buildNow, you can try to build your image with changes above:Type: bitbake corecdp-base-image -c cleanType: bitbake corecdp-base-image -c buildOnce done, ssh into the MT100EOCG device and go to folder: /sys/devices/platform/mtcdp/ and look for the file named: holding-radio-reset-lowTo set it to low/hi:Type: echo 0 > /sys/devices/platform/mtcdp/holding-radio-reset-low[Enter]OrType: echo 1 > /sys/devices/platform/mtcdp/holding-radio-reset-low[Enter]*If you see an USB enumeration message scrolling up, then you know it is working. Otherwise, you can probe on pin 24 on the MT100EOCG Module and verify that it is going low/hi when you issue the above command.Final note, if you go into folder /sys/devices/platform/ folder in your MTCDP/MT100EOCG device, you can also setting up to wake up using other io too, experimental with them.4. Below is the power measurement with H4 radio on the MT100EOCG:- It is done with 9V dc input and I also have issued the following command:echo 0 > /sys/devices/platform/mtcdp/led1echo 0 > /sys/devices/platform/mtcdp/led4echo 0 > /sys/devices/platform/mtcdp/led5echo 0 > /sys/devices/platform/mtcdp/led6to turn off the LEDs. This is for both radio is in idle-non-reset/reset state.Radio is in idle-non-reset state:--------------------------------- H4 mem 84 - 93mA standby 65 - 89mA Notes: The current is sometimes spiking up to ~147mA in both modes.Radio is in reset state:------------------------ H4 mem 38mA standby 60mANotes: To put the radio in reset state, I also issued the following command:echo 0 > /sys/devices/platform/mtcdp/holding-radio-reset-low[Enter]