From 878936645d65d5cd9735428ceba39f32de0a30af Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Thu, 14 Jun 2012 11:30:03 -0700 Subject: [PATCH] Corrected my correction of my misunderstanding of how SGPIO_CTRL_ENABLE works. Turns out I *can* immediately disable a slice using ENABLE. If I want to synchronously disable a slice, I do it via DISABLE. And if I want to screw up my code, I (unwittingly) set all slices to synchronously disable, then configure SGPIO and watch my slices run once and stop. :-( All better now. --- firmware/sgpio/sgpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/sgpio/sgpio.c b/firmware/sgpio/sgpio.c index 79f40af6..62242fbf 100644 --- a/firmware/sgpio/sgpio.c +++ b/firmware/sgpio/sgpio.c @@ -133,7 +133,7 @@ void test_sgpio_interface() { void configure_sgpio_test_tx() { // Disable all counters during configuration - SGPIO_CTRL_DISABLE = 0xFFFF; + SGPIO_CTRL_ENABLE = 0; configure_sgpio_pin_functions(); @@ -199,7 +199,7 @@ void configure_sgpio_test_tx() { void configure_sgpio_test_rx() { // Disable all counters during configuration - SGPIO_CTRL_DISABLE = 0xFFFF; + SGPIO_CTRL_ENABLE = 0; configure_sgpio_pin_functions();