cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f103 VCP like USART interrupt mode

redkofka
Associate II
Posted on January 21, 2013 at 07:45

Hi is there any way to configure usb_vcp on stm32f103 like usart interrupt mode - just recieve only one byte .

I use function compose_packet(received_byte) in all my USART_IRQHandlers and i want to use same function in USB_LP_CAN1_RX0_IRQHandler.

Is there some way to do this ?

Thanks for ideas .....

And have a nice day.

#usb-vcp-interrupt
1 REPLY 1
redkofka
Associate II
Posted on January 21, 2013 at 12:54

So i got it .....

u8 RX_test [4]; 
u8 RX_lenght=0; 
void USB_LP_CAN1_RX0_IRQHandler(void) 
{ 
USB_Istr(); 
if ((count_out != 0) && (bDeviceState == CONFIGURED)) 
{ 
RX_test[RX_lenght++]=buffer_out[0]; 
if(RX_lenght>=4){RX_lenght=0;} 
count_out = 0; 
} 
}

🙂