Skip to content

Commit

Permalink
Fix F031 Serial Output
Browse files Browse the repository at this point in the history
  • Loading branch information
AlkaMotors committed Dec 24, 2024
1 parent d9cd978 commit 3deb564
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Mcu/f031/Src/peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// PERIPHERAL SETUP

#include "peripherals.h"

#include "serial_telemetry.h"
#include "ADC.h"
#include "targets.h"

Expand All @@ -27,6 +27,9 @@ void initCorePeripherals(void)
MX_TIM17_Init();
TEN_KHZ_Timer_Init();
UN_TIM_Init();
#ifdef USE_SERIAL_TELEMETRY
telem_UART_Init();
#endif
}

void initAfterJump()
Expand Down
4 changes: 2 additions & 2 deletions Mcu/f031/Src/serial_telemetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ void telem_UART_Init(void)
}

void send_telem_DMA()
{ // set data length and enable channel to start transfer
{
LL_DMA_DisableChannel(DMA1, LL_DMA_CHANNEL_4);
LL_USART_SetTransferDirection(USART1, LL_USART_DIRECTION_TX);
// GPIOB->OTYPER &= 0 << 6;
LL_DMA_SetDataLength(DMA1, LL_DMA_CHANNEL_4, nbDataToTransmit);
LL_USART_EnableDMAReq_TX(USART1);

Expand Down

0 comments on commit 3deb564

Please sign in to comment.