mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 19:32:36 +08:00
Remove peripheral clock changes as they interfere with current / old NuttX instance
This commit is contained in:
@@ -217,9 +217,6 @@ PX4IO_serial::~PX4IO_serial()
|
|||||||
stm32_unconfiggpio(PX4IO_SERIAL_TX_GPIO);
|
stm32_unconfiggpio(PX4IO_SERIAL_TX_GPIO);
|
||||||
stm32_unconfiggpio(PX4IO_SERIAL_RX_GPIO);
|
stm32_unconfiggpio(PX4IO_SERIAL_RX_GPIO);
|
||||||
|
|
||||||
/* Disable APB clock for the USART peripheral */
|
|
||||||
modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_USART6EN, 0);
|
|
||||||
|
|
||||||
/* and kill our semaphores */
|
/* and kill our semaphores */
|
||||||
sem_destroy(&_completion_semaphore);
|
sem_destroy(&_completion_semaphore);
|
||||||
sem_destroy(&_bus_semaphore);
|
sem_destroy(&_bus_semaphore);
|
||||||
@@ -246,12 +243,9 @@ PX4IO_serial::init()
|
|||||||
/* allocate DMA */
|
/* allocate DMA */
|
||||||
_tx_dma = stm32_dmachannel(PX4IO_SERIAL_TX_DMAMAP);
|
_tx_dma = stm32_dmachannel(PX4IO_SERIAL_TX_DMAMAP);
|
||||||
_rx_dma = stm32_dmachannel(PX4IO_SERIAL_RX_DMAMAP);
|
_rx_dma = stm32_dmachannel(PX4IO_SERIAL_RX_DMAMAP);
|
||||||
if ((_tx_dma == nullptr) || (_rx_dma == nullptr))
|
if ((_tx_dma == nullptr) || (_rx_dma == nullptr)) {
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Enable the APB clock for the USART peripheral */
|
|
||||||
modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_USART6EN);
|
|
||||||
|
|
||||||
/* configure pins for serial use */
|
/* configure pins for serial use */
|
||||||
stm32_configgpio(PX4IO_SERIAL_TX_GPIO);
|
stm32_configgpio(PX4IO_SERIAL_TX_GPIO);
|
||||||
|
|||||||
Reference in New Issue
Block a user