From b520c32bcddabd42c07ceafa827694a3ae23a76f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 11 Aug 2011 15:57:58 -0700 Subject: [PATCH] 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 --- src/ao.h | 3 +++ src/ao_ignite.c | 8 +++++++- src/ao_telemetrum.c | 7 ++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ao.h b/src/ao.h index bb3c80ec..0699fc2c 100644 --- a/src/ao.h +++ b/src/ao.h @@ -1350,6 +1350,9 @@ enum ao_igniter_status { 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); -- 2.30.2