Other Parts Discussed in Thread: EK-TM4C1294XL
Hi,
In the code example below, I open the USB stick, check whether it is connected and then close it again.
But every time the function usbCopy () was executed, 20 bytes of the HeapMemory are no longer released.
The usbCopy function is called within a task. This task has a stack size of 2048 bytes
I have an EK-TM4C1294XL Launch Pad and use TI-RTOS version: TI-RTOS 2.16.1.14.
This code comes from the TI sample project. If the BIOS_exit(0) is deleted in the TI USB sample project and a waiting loop is inserted, you can also see that 20 bytes are missing.
What can be the reason? I ask for help
void usbCopy(void) { // Variables for the CIO functions USBMSCHFatFs_Handle usbmschfatfsHandle; USBMSCHFatFs_Params usbmschfatfsParams; // Mount and register the USB Drive USBMSCHFatFs_Params_init(&usbmschfatfsParams); usbmschfatfsParams.serviceTaskStackPtr = usbServiceTaskStack; usbmschfatfsParams.serviceTaskStackSize = sizeof(usbServiceTaskStack); usbmschfatfsHandle = USBMSCHFatFs_open(0, USB_DRIVE_NUM, &usbmschfatfsParams); if (usbmschfatfsHandle == NULL) { //System_abort("Error starting the USB Drive\n"); } else { System_printf("Drive %u is mounted\n", USB_DRIVE_NUM); System_flush(); } // Need to block until a USB Drive has been enumerated if (!USBMSCHFatFs_waitForConnect(usbmschfatfsHandle, 10000)) { System_printf("No USB drive present, aborting...\n");System_flush(); return; } System_printf("usb close\n"); System_flush(); USBMSCHFatFs_close(usbmschfatfsHandle); }