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.

TMS320F28379D: USB Flash Kernel Aborts with 0xf1

Part Number: TMS320F28379D

Tool/software:

Im currently trying to write my application to the device via usb bootloader and the given flash kernel ti provided along with the usb programmer tool.
It failes consistently with:
Sending 516392 bytes of data from file test.dat...
Error sending bulk transfer: 0x001f
319416 out of 516392 bytes sent
USB operation failed!

Any suggestion how to resolve this?
Kind Regards

  • Hello Tobias, 

    How did you setup the device for the USB bootloader? Did you write "0x0C5A" to the boot mode select address (0xD00) with the debugger? 

    Also, how did you generate the flash kernel and application .dat outputs and what arguments did you pass to the flash programmer?

    Best,
    Matt

  • I found a solution.
    Calling the usb bootloader via emuboot works fine.
    When you want to call it from application the following code runs successful.


        DINT;
        EALLOW;
        DevCfgRegs.DC12.bit.USB_A = 1;
        EDIS;

        IER = 0;
        IFR = 0;

        // relocate stack pointer
        asm(" MOVL XAR6, #0x50 ");  // init xar6 with 0x50 value
        asm(" MOV @SP, AR6 ");       // move ar6 content into sp register

        //uint32_t (*SciBoot)(void) = (uint32_t(*)(void))0x3ff698;
        uint32_t (*USBBoot)(uint16_t) = (uint32_t(*)(uint16_t))0x003fe868;
        uint32_t retval = USBBoot(0);
        (*((void(*)(void))retval))();

    Pay attention to moving the stack pointer prior calling. Also enabling usb peripheral and clearing interrupt registers was necessary.

  • Hi Tobias,

    I'm happy you were able to figure it out! Thank you for showing the solution you found. 

    Best,

    Matt