Skip to content

ISP_DFU_20 driver transfer file in case of USB 2.0 (NUVOTON M487KM) driver development  #36

Description

@SANKETMODHE7028

some issues happen in data transmission .

1 . i have to transmit or receiving the data . so how to do this?
2. i have to change in DFU_Transfer file ?
3. void HSUSBD_ProcessSetupPacket(void)
{
/* Setup packet process */
gUsbCmd.bmRequestType = (uint8_t)(HSUSBD->SETUP1_0 & 0xfful);
gUsbCmd.bRequest = (uint8_t)((HSUSBD->SETUP1_0 >> 8) & 0xfful);
gUsbCmd.wValue = (uint16_t)HSUSBD->SETUP3_2;
gUsbCmd.wIndex = (uint16_t)HSUSBD->SETUP5_4;
gUsbCmd.wLength = (uint16_t)HSUSBD->SETUP7_6;

/* USB device request in setup packet: offset 0, D[6..5]: 0=Standard, 1=Class, 2=Vendor, 3=Reserved */
switch(gUsbCmd.bmRequestType & 0x60ul)
{
case REQ_STANDARD:
{

    HSUSBD_StandardRequest();
    break;
}

case REQ_CLASS:
{
    DFU_ClassRequest();
    break;
}

4.In hsusbd_user.c file only HSUSBD_StandardRequest() function is working for configuration part . when DFU_ClassRequest() ; function is called?
5. suppose i have to pass data so I have to calling seperately?
6. please give me the proper logic.

for example : - I have to transmit arr[10] = {1,2,3,4,5,6,7,8,9,0}; how to transmit ?
control in or control out.

case:

pc utility <--------------------------------> device
TX
command 9 ----------------------> 1st byte received.
RX
2 received <------------------------ 2 (device sending 2)
ACK
6 -------------------------> ACK byte received

64 bytes received < -------------------------- 64 bytes data packet send to pc

note :- 9 and 6 are random value of 1 bytes.

this is the flow of code so please find a perfect logic for this .

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions