mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
Fix GPIO AF settings being overridden by timerInit(). (#12886)
This commit is contained in:
parent
7d1007ea03
commit
646de8c57d
6 changed files with 33 additions and 8 deletions
|
@ -271,6 +271,15 @@ void init(void)
|
|||
// initialize IO (needed for all IO operations)
|
||||
IOInitGlobal();
|
||||
|
||||
#ifdef USE_TIMER
|
||||
// timerIOInit blindly reconfigures GPIO AF for all pins in the fullTimerHardware array regardless
|
||||
// of if the timer pin is used already by something else.
|
||||
// If it is called AFTER the SPI initilisation, any AF settings for the SPI are overridden by timer
|
||||
// AF, making the SPI hang when it's used.
|
||||
// To work-around this issue init timer AF before other AF, such as SPI/QSPI/OSPI/etc.
|
||||
timerIOInit();
|
||||
#endif
|
||||
|
||||
#ifdef USE_HARDWARE_REVISION_DETECTION
|
||||
detectHardwareRevision();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue