AnsweredAssumed Answered

USB vcom read write problem sdk 2.3 MK21FN1M0xxx12

Question asked by Cristian Pietrobon on Dec 13, 2017
Latest reply on Dec 15, 2017 by Cristian Pietrobon

Hi everyone,

I'm having trouble making the vcom example work as expected.

 

I implemented the read/write blocking functions, but sending long data packets (chunked at 56-byte block consecutive transfer)
presents some problem.

 

 

Example Terminal output:

 

 

/* main example using freertos */

 

/* Init board hardware. */
BOARD_InitPins();
BOARD_BootClockRUN();

 

/*init the api usb*/
APPInit();

 

 

uint8_t buff[70];
int k = 32;
for(int i=0;i<sizeof(buff);i++){
buff[i] = k;
k++;
}

while(1) {
usb_write(buff,sizeof(buff),100);
usb_write("\n\r",2,100);
vTaskDelay( pdMS_TO_TICKS( 1000 ) );
}


I tried without and with hardware flow control, nothing changed.
I'm using the nxp driver located inside the folder usb_device_cdc_vcom.

 

OS windows 10

 

mcu MK21FN1M0xxx12

sdk version 2.3

 

Same problem under ubuntu (tail -f xxxx)

Attachments

Outcomes