File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -81,12 +81,12 @@ INC += -I../../supervisor/shared/usb
81
81
82
82
# Debugging/Optimization
83
83
ifeq ($(DEBUG ) , 1)
84
- CFLAGS += -ggdb
84
+ CFLAGS += -ggdb3
85
85
# You may want to enable these flags to make setting breakpoints easier.
86
86
CFLAGS += -fno-inline -fno-ipa-sra
87
87
else
88
88
CFLAGS += -Os -DNDEBUG
89
- CFLAGS += -ggdb
89
+ CFLAGS += -ggdb3
90
90
# TODO: Test with -flto
91
91
# CFLAGS += -flto
92
92
endif
Original file line number Diff line number Diff line change @@ -238,8 +238,11 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
238
238
239
239
self -> handle .Instance = SPIx ;
240
240
self -> handle .Init .Mode = SPI_MODE_MASTER ;
241
- // Direction change only required for RX-only, see RefMan RM0090:884
242
- self -> handle .Init .Direction = (self -> mosi == NULL ) ? SPI_DIRECTION_2LINES_RXONLY : SPI_DIRECTION_2LINES ;
241
+ // Implementing one-directional recieve-only SPI as per [RefMan RM0090:884]
242
+ // results in BSY bit related hangs. Using MOSI as an IO works fine without it,
243
+ // so it's unclear why this mode is present in the first place.
244
+ //self->handle.Init.Direction = (self->mosi == NULL) ? SPI_DIRECTION_2LINES_RXONLY : SPI_DIRECTION_2LINES;
245
+ self -> handle .Init .Direction = SPI_DIRECTION_2LINES ;
243
246
self -> handle .Init .DataSize = SPI_DATASIZE_8BIT ;
244
247
self -> handle .Init .CLKPolarity = SPI_POLARITY_LOW ;
245
248
self -> handle .Init .CLKPhase = SPI_PHASE_1EDGE ;
You can’t perform that action at this time.
0 commit comments