fmu-v5x:Properly reset SPI

This commit is contained in:
David Sidrane
2019-11-19 12:37:43 -08:00
committed by Daniel Agar
parent 14b592d0c6
commit eb560e8a0f
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -220,10 +220,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true); VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true); VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true); VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS1_EN(true); board_spi_reset(0xff00000A);
VDD_3V3_SENSORS2_EN(true);
VDD_3V3_SENSORS3_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true); VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */ /* Need hrt running before using the ADC */
+1 -1
View File
@@ -306,7 +306,7 @@ __EXPORT uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, uint32_t devid)
__EXPORT void board_spi_reset(int mask_ms) __EXPORT void board_spi_reset(int mask_ms)
{ {
int ms = mask_ms & 0x00ffffff; int ms = mask_ms & 0x00ffffff;
int mask = ((mask_ms & 0xff000000) >> 24) ^ 0xff; int mask = ((mask_ms & 0xff000000) >> 24) & 0xff;
// disable SPI bus // disable SPI bus