Other Parts Discussed in Thread: EK-TM4C1294XL, , TM4C1294NCPDT
Hi,
So...I was trying to write a text file on my Tiva device (EK-TM4C1294XL), after a couple of time trying to understand how the usb_host_msc works, I decided to create a function that writes some text file for logging purposes. Everything was running smooth so far, except that in the beginning I was only printing some random strings.
Then I decided to make a loop to write the string multiple times in the file. Flashed the new code, didn't work the way I expected, tried to modify the code and that was when the compiler refused to load the program on my device. I tried a couple of times until I realized the MCU core was very, very hot, and obviously, dead ;-;
This was the function I was executing at the time:
int Cmd_write(int argc, char *argv[]) { UINT bw; char algo[] = "Alguma coisa \n"; int var = 0; while(var < 12) { if(f_open(&g_sFileObject, "arquivo.txt", FA_WRITE | FA_OPEN_ALWAYS) == FR_OK) { // Open file - If nonexistent, create f_lseek(&g_sFileObject, g_sFileObject.fsize); // Move forward by filesize; logfile.fsize+1 is not needed in this application f_write(&g_sFileObject, algo, sizeof(algo), &bw); // Append word UARTprintf("File size is %u\n",g_sFileObject.fsize); // Print size f_close(&g_sFileObject); // Close the file if (bw == sizeof(algo)) { UARTprintf("Op successful\n"); } } ROM_SysCtlDelay((120000000/3)*0.15f); var++; } return 0; }
Also I'm attaching a image that shows how the USB stick connection was made. How that happened? I was planning to use the USB stick in the TM4C123, but now I'm afraid of killing my other Tiva as well...not to mention that some hardware modifications is required for that device.
Thanks