{
uint8_t ucTemp;
If (USART_GetiTStatus (DEBUG_USARTx, USART_IT_RXNE)!=RESET)
{
ucTemp=USART_ReceiveData(DEBUG_USARTx);
Time=ucTemp;
TIM_SetCompare1 (GENERAL_TIM, time);
USART_SendData (DEBUG_USARTx, time);
}
}
The main function is that
Int main (void)
{
USART_Config ();
GENERAL_TIM_Init ();
While (1) {
}}
With serial assistants first enter the Numbers change duty ratio steering gear movement, after input is no reaction, but the screen or print out the interrupt request print number, is this why?
CodePudding user response:
Duty ratio doesn't change?CodePudding user response:
Duty cycle if there is any change, use oscilloscope measurement,In addition
this two sentences do not put in best
TIM_SetCompare1 (GENERAL_TIM, time);
USART_SendData (DEBUG_USARTx, time);
the implementation,
Void DEBUG_USART_IRQHandler (void)
CodePudding user response:
If the inside of the interrupt time is too oftenCodePudding user response:
There is no clear interrupt flag bit ahCodePudding user response: