got the bootloader->main handoff working
diff --git a/bbb_cape/src/cape/analog.c b/bbb_cape/src/cape/analog.c
index 0ccd2f0..58a1563 100644
--- a/bbb_cape/src/cape/analog.c
+++ b/bbb_cape/src/cape/analog.c
@@ -28,7 +28,7 @@
// (100ns+8ns)*120MHz = 12.96
// Clear the CSEL pin to select it.
- for (int i = 0; i < 9; ++i) CSEL_GPIO->BSRRH = 1 << CSEL_NUM;
+ for (int i = 0; i < 9; ++i) CSEL_GPIO->BSRRL = 1 << CSEL_NUM;
current_channel = channel;
uint16_t data = 1 << 8 /* start bit */ |
0 << 7 /* not differential */ |
@@ -43,7 +43,7 @@
// Masking off the high bits is important because there's nothing driving
// the MISO line during the time the MCU receives them.
analog_readings[current_channel] = value & 0x3FF;
- CSEL_GPIO->BSRRL = 1 << CSEL_NUM;
+ CSEL_GPIO->BSRRH = 1 << CSEL_NUM;
TIM->CR1 = TIM_CR1_UDIS;
TIM->CCR1 = 1;
@@ -66,7 +66,7 @@
RCC->APB1ENR |= RCC_APB1ENR_TIMEN;
gpio_setup_out(CSEL_GPIO, CSEL_NUM, 3);
- CSEL_GPIO->BSRRL = 1 << CSEL_NUM; // make sure it's deselected
+ CSEL_GPIO->BSRRH = 1 << CSEL_NUM; // make sure it's deselected
gpio_setup_alt(GPIOB, 13, 5); // SCK
gpio_setup_alt(GPIOB, 14, 5); // MISO