mirror of https://github.com/ArduPilot/ardupilot
HAL_ChibiOS: adjust SPI pin speeds
This commit is contained in:
parent
36f0b429fb
commit
a5bafb399f
|
@ -99,7 +99,7 @@ PD7 BARO_CS CS
|
||||||
# USART3 serial3 telem2
|
# USART3 serial3 telem2
|
||||||
PD8 USART3_TX USART3
|
PD8 USART3_TX USART3
|
||||||
PD9 USART3_RX USART3
|
PD9 USART3_RX USART3
|
||||||
PD10 FRAM_CS CS SPEED_LOW
|
PD10 FRAM_CS CS SPEED_VERYLOW
|
||||||
PD11 USART3_CTS USART3
|
PD11 USART3_CTS USART3
|
||||||
PD12 USART3_RTS USART3
|
PD12 USART3_RTS USART3
|
||||||
PD13 TIM4_CH2 TIM4 PWM(5) GPIO(54)
|
PD13 TIM4_CH2 TIM4 PWM(5) GPIO(54)
|
||||||
|
|
|
@ -169,12 +169,9 @@ class generic_pin(object):
|
||||||
|
|
||||||
def get_OSPEEDR(self):
|
def get_OSPEEDR(self):
|
||||||
'''return one of SPEED_VERYLOW, SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH'''
|
'''return one of SPEED_VERYLOW, SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH'''
|
||||||
|
# on STM32F4 these speeds correspond to 2MHz, 25MHz, 50MHz and 100MHz
|
||||||
values = ['SPEED_VERYLOW', 'SPEED_LOW', 'SPEED_MEDIUM', 'SPEED_HIGH']
|
values = ['SPEED_VERYLOW', 'SPEED_LOW', 'SPEED_MEDIUM', 'SPEED_HIGH']
|
||||||
v = 'SPEED_HIGH'
|
v = 'SPEED_MEDIUM'
|
||||||
if self.is_CS():
|
|
||||||
v = "SPEED_MEDIUM"
|
|
||||||
if self.type.startswith("I2C"):
|
|
||||||
v = "SPEED_MEDIUM"
|
|
||||||
for e in self.extra:
|
for e in self.extra:
|
||||||
if e in values:
|
if e in values:
|
||||||
v = e
|
v = e
|
||||||
|
|
Loading…
Reference in New Issue