This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I need a help for code..

Hello everybody.
I need to transmit through UART a fixed number in the data block through the command.
I did this :
void USART2_IRQHandler(void)
{

if ( USART_GetITStatus(USART2, USART_IT_RXNE) )
{
USART_ClearITPendingBit(USART2, USART_IT_RXNE);
RX_buffer[RX_write] = USART_ReceiveData(USART2);
RX_write++; //chetchik ukazatel na massive
RX_ct++;
if (RX_ct == 9)
{
if (RX_buffer[0] == 0x01) //ID
{
ID();
}
}
}
}

void ID (uint8_t i)
{
while (!USART_GetFlagStatus(USART2, USART_SR_TXE)) {}
USART_SendData(USART2,i=10);
}


But it's not working...
0