diff options
author | Keith Packard <keithp@keithp.com> | 2011-08-11 15:57:58 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-08-11 15:57:58 -0700 |
commit | b520c32bcddabd42c07ceafa827694a3ae23a76f (patch) | |
tree | cf8fe2783154a2e218c9010c83711d1f4b365efc /src | |
parent | 566b16e67be38c6425e616a5c38d641c4e1a9b12 (diff) |
altos: Pull igniter pins low as soon as possible at boot time
This reduces the pulse width on the igniter circuit caused by the
default cc1111 pin configuration at powerup time.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ao.h | 3 | ||||
-rw-r--r-- | src/ao_ignite.c | 8 | ||||
-rw-r--r-- | src/ao_telemetrum.c | 7 |
3 files changed, 16 insertions, 2 deletions
@@ -1351,6 +1351,9 @@ enum ao_igniter_status ao_igniter_status(enum ao_igniter igniter); void +ao_ignite_set_pins(void); + +void ao_igniter_init(void); /* diff --git a/src/ao_ignite.c b/src/ao_ignite.c index 512ec622..5238beb4 100644 --- a/src/ao_ignite.c +++ b/src/ao_ignite.c @@ -202,11 +202,17 @@ __code struct ao_cmds ao_ignite_cmds[] = { __xdata struct ao_task ao_igniter_task; void -ao_igniter_init(void) +ao_ignite_set_pins(void) { AO_IGNITER_DROGUE = 0; AO_IGNITER_MAIN = 0; AO_IGNITER_DIR |= AO_IGNITER_DROGUE_BIT | AO_IGNITER_MAIN_BIT; +} + +void +ao_igniter_init(void) +{ + ao_ignite_set_pins(); ao_cmd_register(&ao_ignite_cmds[0]); ao_add_task(&ao_igniter_task, ao_igniter, "igniter"); } diff --git a/src/ao_telemetrum.c b/src/ao_telemetrum.c index 4ace415c..d9ea1fc8 100644 --- a/src/ao_telemetrum.c +++ b/src/ao_telemetrum.c @@ -28,8 +28,13 @@ ao_set_monitor(uint8_t monitoring) void main(void) { - ao_clock_init(); + /* + * Reduce the transient on the ignite pins at startup by + * pulling the pins low as soon as possible at power up + */ + ao_ignite_set_pins(); + ao_clock_init(); /* Turn on the red LED until the system is stable */ ao_led_init(LEDS_AVAILABLE); |