All Forums
 Hardware
 General Hardware, ADSmartIO, Digital I/O and A/Ds
 BitsyXb shutdown completed pin?
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

billflanery

1 Posts

Posted - 23 Sep 2008 :  13:15:56  Show Profile  Email Poster
In my application, the BitsyXb will only be turned on for a few minutes per day. The rest of the time it must draw almost no power (micro amps) to conserve batteries. Since Sleep mode is still too power-hungry, I'm making the power supply be able to turn the BitsyXb on at a certain time, and then the program will be able to turn it off using the Linux shutdown -hP command. I will need to know when the BitsyXb has completed the shutdown in order to know it's safe to turn off the power supply.

Is there a pin/connector on the Quad UART peripheral board that can indicate that it's safe to remove power?

Thanks.

Edited by - billflanery on 23 Sep 2008 13:17:11

ljoy

22 Posts

Posted - 26 Sep 2008 :  15:38:23  Show Profile  Email Poster
Your best bet is to modify the kernel to signal “system halted” by toggling the state of a GPIO line. Here’s how:
When you shut down the BitsyXb, you should eventually see "System halted." on the console. If you look for "System halted" in kernel/sys.c you'll see it gets printed before machine_halt() is called.
The machine_halt function is in arch/arm/kernel/process.c and currently does nothing. You can add code to change the state of a CPU GPIO that's connected to one of the pins on the personality board, e.g.
    /* Signal shutdown on GPIO107. */
    GPSR(107) = GPIO_bit(107);
to change the state of 'UCBIO9' (J3, pin 1).
Be sure to add code to set up the GPIO as an output for signaling a shutdown in function adsbitsyxb_init in arch/arm/mach-pxa/adsbitsyxb.c, e.g.
    pxa_gpio_mode(107 | GPIO_OUT);
to make 'UCBIO9' (J3, pin 1) an output.

Hope this helps.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000