Call to USBD_CtrlTx sending wrong data.

Call to USBD_CtrlTx sending wrong data.

Home Forums USB Device & Host Call to USBD_CtrlTx sending wrong data.

This topic contains 1 reply, has 2 voices, and was last updated by  Fernando Flores 10 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #24942

    John Keller

    Long story short, I’m providing the correct inputs to the call but the function is picking a spot at random for the data buffer.

    I’m new to Micrium OS, but it seems like void *buffer is pretty self explanatory.
    I interpret that as “pass the address of the data buffer”.
    IE: char *data_buffer;
    data_buffer=”123456789″; (Assigned to RAM buffer in actual application.)
    USBD_CtrlTx(device, data_buffer, 10, etc.)

    I have run this in the debugger and followed the disassembled code right up the the BL instruction for this call.
    R1 contains the correct address of the data I wish to send, but the other end (PC) of the connection is receiving some random section in memory from the embedded system. The embedded system is a Kinetis K64P144M12 uController and we are running the Micrium supplied driver for it.

    I have verified that the address is correct, and that the correct data is at the address indicated on the embedded system.
    The report length received is even correct, just the wrong data.

    Any ideas? Anyone seen this before?


    Fernando Flores


    could you please set Master 4 Access protection bit[9-8] in PFAPR register to “Only read accesses may be performed by this master”

    FMC->PFAPR |= 0x00000100;


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

View the complete site map