xmos / fwk_io

I/O Framework
Other
2 stars 11 forks source link

SPI Master and QSPI may change status register in ways the application does not expect #28

Closed xmos-jmccarthy closed 2 years ago

xmos-jmccarthy commented 2 years ago

This driver enables high priority and fast mode via the status register, on the core that it ends up executing on. It may be desired by the application that the same core that performed a spi transaction have either of these set.

SPI https://github.com/xmos/fwk_io/blob/290c3ec127af4a4cdfdea482d168c16a5b6f4bc7/modules/spi/src/spi_master.c#L13 https://github.com/xmos/fwk_io/blob/290c3ec127af4a4cdfdea482d168c16a5b6f4bc7/modules/spi/src/spi_master.c#L206

QSPI https://github.com/xmos/fwk_io/blob/290c3ec127af4a4cdfdea482d168c16a5b6f4bc7/modules/qspi_io/api/qspi_io.h#L357 https://github.com/xmos/fwk_io/blob/290c3ec127af4a4cdfdea482d168c16a5b6f4bc7/modules/qspi_io/api/qspi_io.h#L357

Desired behavior should have the driver store the starting state of the status register, and restore it.

xmos-jmccarthy commented 2 years ago

Also, see #27