Skip to content

Commit 4a8f540

Browse files
committed
output 0xff when no chip connected
1 parent 0986b5e commit 4a8f540

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spi.c

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ uint32_t spi_setup(uint32_t speed_hz) {
6565
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_SPI1_SCK | GPIO_SPI1_MOSI);
6666
gpio_set_mode(GPIOA, GPIO_MODE_INPUT, GPIO_CNF_INPUT_PULL_UPDOWN, GPIO_SPI1_MISO);
6767
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO_SPI1_NSS); /* SS is manual */
68+
gpio_set(GPIOA, GPIO_SPI1_MISO);
6869

6970
/* Reset SPI, SPI_CR1 register cleared, SPI is disabled */
7071
spi_reset(SPI1);

0 commit comments

Comments
 (0)