This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28388D: Hard Fault Error (0x1624) During USB File Read in FTP Server Application on CM Core

Part Number: TMS320F28388D

Hi Sir,

In this controller, I have implemented an FTP server application with USB storage access. I am transferring a CSV file to the client side, where the USB operates in read mode, and the f_read function is used to access the file.

The issue I am encountering is that while reading the file, the code runs for some time and then gets stuck, eventually resulting in a hard fault error. The system reports the fault address as 0x1624.

Both Ethernet and USB functionalities are handled within the CM core.

Could you please help identify the possible cause of this issue and suggest a solution?

Thanks,
Savan

  • Savan

    A hard fault is usually caused due to a memory access violation. 

     It can be triggered by tstack overflows, unaligned memory access, or interrupt priority conflicts. 
    Possible fixes 

    1. Increase the stack size

    2. Ensure the buffer passed to f_read is 4-byte aligned since CM can trigger a hard fault if a 32-bit load/store is attempted on an address that is not 4-byte aligned

    Best Regards

    Siddharth

  • I try with increase the stack size , also my buffer structure is 

    typedef struct __attribute__((packed))
    {
    uint32_t app_data_len;
    uint8_t app_queue_data[1460];
    uint32_t dummy;
    uint32_t dummy1;
    } App_QueueData_t;

    This is my buffer app_queue_data[1460] data, and My stack size is 4096.