✨ BigTreeTech Manta M4P, M5P, M8P V1.0 / 1.1, E3 EZ (#25001)
This commit is contained in:
committed by
Sven Soost
parent
d58daf80f5
commit
6768759d96
@@ -218,6 +218,7 @@ WEAK const PinMap PinMap_UART_TX[] = {
|
||||
{PC_12, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
|
||||
{PD_3, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
|
||||
{PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART2)},
|
||||
{PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
|
||||
{PF_2, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART2)},
|
||||
{NC, NP, 0}
|
||||
};
|
||||
@@ -252,6 +253,7 @@ WEAK const PinMap PinMap_UART_RX[] = {
|
||||
{PC_11_ALT1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART4)},
|
||||
{PD_2, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
|
||||
{PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART2)},
|
||||
{PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
|
||||
{NC, NP, 0}
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -130,14 +130,7 @@ WEAK void SystemClock_Config(void)
|
||||
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
||||
|
||||
// Reset clock registers (in case bootloader has changed them)
|
||||
RCC->CR |= RCC_CR_HSION;
|
||||
while (!(RCC->CR & RCC_CR_HSIRDY))
|
||||
;
|
||||
RCC->CFGR = 0x00000000;
|
||||
RCC->CR = RCC_CR_HSION;
|
||||
while (RCC->CR & RCC_CR_PLLRDY)
|
||||
;
|
||||
RCC->PLLCFGR = 0x00001000;
|
||||
SystemInit();
|
||||
|
||||
/** Configure the main internal regulator output voltage
|
||||
*/
|
||||
|
||||
@@ -158,6 +158,9 @@
|
||||
#endif
|
||||
|
||||
// UART Definitions
|
||||
//#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below
|
||||
#define ENABLE_HWSERIAL3
|
||||
|
||||
#ifndef SERIAL_UART_INSTANCE
|
||||
#define SERIAL_UART_INSTANCE 2
|
||||
#endif
|
||||
@@ -171,6 +174,15 @@
|
||||
#define PIN_SERIAL_TX PA2
|
||||
#endif
|
||||
|
||||
// Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number
|
||||
// Used when user instantiate a hardware Serial using its peripheral name.
|
||||
// Example: HardwareSerial mySerial(USART3);
|
||||
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
|
||||
#define PIN_SERIAL1_RX PA3
|
||||
#define PIN_SERIAL1_TX PA2
|
||||
#define PIN_SERIAL3_RX PD9
|
||||
#define PIN_SERIAL3_TX PD8
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user