diff --git a/Pwms.c b/Pwms.c index 96c803b..af6bc24 100644 --- a/Pwms.c +++ b/Pwms.c @@ -46,7 +46,7 @@ void Bsp_Tpu_PwmRearOverflowCallBack(void) { } void Bsp_Tpu_PwmRearCaptureCallback(void) { - Get_Set_Tpu_PwmCaptureCallback(&PWMS.pwmFrontCapture); + Get_Set_Tpu_PwmCaptureCallback(&PWMS.pwmRearCapture); } void Bsp_Tpu_PwmRearCapture_OverflowCallBack(void) { @@ -160,7 +160,7 @@ void Pwms_Init(tLoggerInterface *logger) { PWM_Initial( &env->pwmRear, - true, + false, PERIOD_TICKS, PERIOD_TICKS * 5 / 100, 27U, @@ -169,7 +169,7 @@ void Pwms_Init(tLoggerInterface *logger) { Bsp_Tpu_PwmRearOverflowCallBack ); - env->pwmFrontIo = vPwmGetIo(&env->pwmFront); + env->pwmRearIo = vPwmGetIo(&env->pwmRear); // TPU_CH17: PortD 21: ALT4 @@ -188,6 +188,7 @@ void Pwms_Init(tLoggerInterface *logger) { env->pwmRearCaptureIO = vPwmCaptureGetIo(&env->pwmRearCapture); + //конец--------------------------PwmRear------------------------------------------------- //конец--------------------------PwmRear------------------------------------------------- //конец--------------------------PwmRear------------------------------------------------- @@ -196,34 +197,34 @@ void Pwms_Init(tLoggerInterface *logger) { //начало--------------------------PwmFrontReserve------------------------------------------------- //начало--------------------------PwmFrontReserve------------------------------------------------- - // TPU_CH23: PortD 30: ALT6 - tInitStruct.u32PortPins = PORT_PIN_31; + // TPU_CH15: PortD 30: ALT6 + tInitStruct.u32PortPins = PORT_PIN_30; tInitStruct.uPortPinMux.u32PortPinMode = PORT_ALT6_FUNC_MODE; - PORT_InitPins(PORT_C, &tInitStruct); + PORT_InitPins(PORT_D, &tInitStruct); PWM_Initial( &env->pwmFrontReserved, - true, + false, PERIOD_TICKS, PERIOD_TICKS * 5 / 100, - 23U, + 15U, 0xFF, Bsp_Tpu_PwmFrontReserveCallback, Bsp_Tpu_PwmFrontReserveOverflowCallBack ); - env->pwmFrontIo = vPwmGetIo(&env->pwmFrontReserved); + env->pwmFrontReservedIo = vPwmGetIo(&env->pwmFrontReserved); - // TPU_CH21: PortC 29: ALT6 + // TPU_CH16: PortC 29: ALT6 tInitStruct.u32PortPins = PORT_PIN_29; tInitStruct.uPortPinMux.u32PortPinMode = PORT_ALT6_FUNC_MODE; - PORT_InitPins(PORT_C, &tInitStruct); + PORT_InitPins(PORT_D, &tInitStruct); PWM_Capture_Initial( &env->pwmFrontReservedCapture, false, - 21U, + 14U, 0xFF, Bsp_Tpu_PwmFrontReserveCaptureCallback, Bsp_Tpu_PwmFrontReserveCapture_OverflowCallBack @@ -239,34 +240,34 @@ void Pwms_Init(tLoggerInterface *logger) { //начало--------------------------PwmRearReserve------------------------------------------------- //начало--------------------------PwmRearReserve------------------------------------------------- - // TPU_CH15: PortD 30: ALT6 - tInitStruct.u32PortPins = PORT_PIN_30; + // TPU_CH23: PortC 31: ALT6 + tInitStruct.u32PortPins = PORT_PIN_31; tInitStruct.uPortPinMux.u32PortPinMode = PORT_ALT6_FUNC_MODE; - PORT_InitPins(PORT_D, &tInitStruct); + PORT_InitPins(PORT_C, &tInitStruct); PWM_Initial( &env->pwmRearReserved, - true, + false, PERIOD_TICKS, PERIOD_TICKS * 5 / 100, - 15U, + 23U, 0xFF, Bsp_Tpu_PwmRearReserveCallback, Bsp_Tpu_PwmRearReserveOverflowCallBack ); - env->pwmFrontIo = vPwmGetIo(&env->pwmRearReserved); + env->pwmRearReservedIo = vPwmGetIo(&env->pwmRearReserved); - // TPU_CH14: PortD 29: ALT6 + // TPU_CH21: PortD 29: ALT6 tInitStruct.u32PortPins = PORT_PIN_29; tInitStruct.uPortPinMux.u32PortPinMode = PORT_ALT6_FUNC_MODE; - PORT_InitPins(PORT_D, &tInitStruct); + PORT_InitPins(PORT_C, &tInitStruct); PWM_Capture_Initial( &env->pwmRearReservedCapture, false, - 14U, + 21U, 0xFF, Bsp_Tpu_PwmRearReserveCaptureCallback, Bsp_Tpu_PwmRearReserveCapture_OverflowCallBack