mirror of https://github.com/ARMmbed/mbed-os.git
PWM channels definition update, serial uses external global variable system clock
parent
ffac7e6d6a
commit
4732796ab4
|
@ -33,14 +33,14 @@ static const PinMap PinMap_PWM[] = {
|
|||
{D10, PWM_2 , 4}, // PTC2, FTM0 CH1
|
||||
|
||||
{PTA0, PWM_6 , 3}, // PTA0, FTM0 CH5
|
||||
{PTA3, PWM_0 , 3}, // PTA3, FTM0 CH0
|
||||
{PTA4, PWM_1 , 3}, // PTA4, FTM0 CH1
|
||||
{PTA3, PWM_1 , 3}, // PTA3, FTM0 CH0
|
||||
{PTA4, PWM_2 , 3}, // PTA4, FTM0 CH1
|
||||
{PTA5, PWM_3 , 3}, // PTA5, FTM0 CH2
|
||||
{PTA12, PWM_9 , 3}, // PTA12, FTM1 CH0
|
||||
{PTA13, PWM_10, 3}, // PTA13, FTM1 CH1
|
||||
{PTB0, PWM_9 , 3}, // PTB0, FTM1 CH0
|
||||
{PTB1, PWM_10, 3}, // PTB1, FTM1 CH1
|
||||
{PTC1, PWM_0 , 4}, // PTC1, FTM0 CH0
|
||||
{PTC1, PWM_1 , 4}, // PTC1, FTM0 CH0
|
||||
{PTD4, PWM_4 , 4}, // PTD4, FTM0 CH3
|
||||
{PTD6, PWM_7 , 4}, // PTD6, FTM0 CH6
|
||||
{PTD7, PWM_8 , 4}, // PTD7, FTM0 CH7
|
||||
|
|
|
@ -98,8 +98,7 @@ void serial_baud(serial_t *obj, int baudrate) {
|
|||
// Disable UART before changing registers
|
||||
obj->uart->C2 &= ~(UART_C2_RE_MASK | UART_C2_TE_MASK);
|
||||
|
||||
// [TODO] not hardcode this value
|
||||
uint32_t PCLK = (obj->uart == UART0) ? 48000000u : 24000000u;
|
||||
uint32_t PCLK = (obj->uart == UART0) ? SystemCoreClock : SystemCoreClock/2;
|
||||
|
||||
// First we check to see if the basic divide with no DivAddVal/MulVal
|
||||
// ratio gives us an integer result. If it does, we set DivAddVal = 0,
|
||||
|
|
Loading…
Reference in New Issue