AnsweredAssumed Answered

How can I write every second with USB MSC STM32f105

Question asked by guler.umit on Dec 13, 2015
Latest reply on Dec 29, 2015 by guler.umit
Hi everyone,
I wanna write my variable to USB every second but I can't.
I think it can be in while loop 

f_mount(0, &fatfs);
    
    if(f_open(&file, "0:OLCUM.CSV",FA_CREATE_ALWAYS | FA_WRITE) == FR_OK)
    { 
   
                     sprintf (king, " %d\n ", saniye1);
                      bytesToWrite = sizeof(king);
                      f_lseek(&file, file.fsize); // Seek to tail
                      res= f_write (&file, king, bytesToWrite, (void *)&bytesWritten);
                      f_sync(&file);

      f_close(&file);
      f_mount(0, NULL); 

or in while loop;
 USBH_Process(&USB_OTG_Core, &USB_Host);

 but I couldnt..

What can I do??




but I could not.
but I could not.
but I could not.

Outcomes