mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 02:36:37 +08:00
fmu-v5x:Properly reset SPI
This commit is contained in:
committed by
Daniel Agar
parent
14b592d0c6
commit
eb560e8a0f
@@ -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 */
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user