Skip to content

Commit

Permalink
Allow DMA remapping on Robus L0
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-rabault committed Mar 7, 2024
1 parent 3a1c5a5 commit c39b19b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions network/robus_network/HAL/STM32L0/robus_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ void RobusHAL_ComInit(uint32_t Baudrate)
ROBUS_DMA_CLOCK_ENABLE();

LL_DMA_SetPeriphRequest(ROBUS_DMA, ROBUS_DMA_CHANNEL, ROBUS_DMA_REQUEST);
LL_SYSCFG_SetRemapDMA_USART(ROBUS_DMA_REMAP);
LL_DMA_SetDataTransferDirection(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH);
LL_DMA_SetChannelPriorityLevel(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PRIORITY_LOW);
LL_DMA_SetMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MODE_NORMAL);
Expand Down
3 changes: 3 additions & 0 deletions network/robus_network/HAL/STM32L0/robus_hal_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
#ifndef ROBUS_DMA_REQUEST
#define ROBUS_DMA_REQUEST LL_DMA_REQUEST_3
#endif
#ifndef ROBUS_DMA_REMAP
#define ROBUS_DMA_REMAP LL_SYSCFG_USART1TX_RMP_DMA1CH2
#endif

/*******************************************************************************
* COM TIMEOUT CONFIG
Expand Down

0 comments on commit c39b19b

Please sign in to comment.