CY_U3P_ERROR_BAD_ARGUMENT

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
gean_3054931
Level 5
Level 5
10 likes given 5 likes given First like received

Hello,

I have created CyU3PDmaChannelCreate(&glChHandleSlFifoStoU,CY_U3P_DMA_TYPE_MANUAL, &dmaCfg);

This API is returning CY_U3P_ERROR_BAD_ARGUMENT error 64 even configuration parameters are valid.why?

for the above chennel creation,our segger breakepoint is not going inside dmacall.

this is the dmacallback function.

void

CyFxSlFifoStoUDmaCallback (

        CyU3PDmaChannel   *chHandle,

        CyU3PDmaCbType_t  type,

        CyU3PDmaCBInput_t *input

        )

{

    CyU3PDmaBuffer_t buf_p;

    CyU3PReturnStatus_t status = CY_U3P_SUCCESS;

    if (type == CY_U3P_DMA_CB_PROD_EVENT)

   {

        status = CyU3PDmaChannelCommitBuffer (chHandle, input->buffer_p.count, 0);

        //Increment the counter.

        glDMARxCount++;

    }

  

    if (type == CY_U3P_DMA_CB_RECV_CPLT)

        {

    if (status != CY_U3P_SUCCESS)

                {

            status = CyU3PSibReadWriteRequest (1, 0,

            4, 2, 0, 1);

                }

        }

}

I have attached the source code,please let me know the reason.

thank you.

0 Likes
1 Solution

Hello,

- Have you ensured that the SIB initialization and start APIs are successfully completed?

- I could find that the issue is caused because of the producer socket, which is SIB socket. Try using the method mentioned in the SDK examples and check if the error exists.

EDIT: The GPIOs that have been configured using the CyU3PDeviceConfigureIOMatrix() API are part of the SIB blocks. Hence, these pins cannot be used as normal GPIOs if SIB blocks are to be used.

Best regards,

Srinath S

View solution in original post

0 Likes
5 Replies
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

In the main() function block, the IO configuration matrix is set such that S0 port is used and S1 port is inactive.

io_cfg.s0Mode =CY_U3P_SPORT_4BIT;

io_cfg.s1Mode =CY_U3P_SPORT_INACTIVE;

But, in the CyU3PDmaChannelCreate() API, the DMA channel configuration parameter is set such that the producer socket is S1 port which is an invalid configuration.

dmaCfg.prodSckId = CY_U3P_SIB_SOCKET_1;

Best regards,
Srinath S

0 Likes
lock attach
Attachments are accessible only for community members.

Hello,

I have tested on this also but problem is same.please look for an attachment.

dmaCfg.prodSckId = CY_U3P_SIB_SOCKET_0;

thank you.

0 Likes

Hello,

- Please let us know which board are you using to test the firmware? Is it a Cypress provided RDK or is it your custom board?

- Are all the other APIs prior to the CyU3PDmaChannelCreate() API returning CY_U3P_SUCCESS?

- When you try to load the firmware into the device, are you seeing the same error on the CyU3PDmaChannelCreate() API?

Best regards,

Srinath S

0 Likes

Hello shrinath,

I am using custom board.

CyU3PDmaChannelCreate() from p port(producer) to s port (consumer) API is returning CY_U3P_SUCCESS.

CyU3PDmaChannelCreate() from s port(producer) to u port (consumer) API is returning error 64 as discussed.

When you try to load the firmware into the device, are you seeing the same error on theCyU3PDmaChannelCreate() API?

yes.

thank you.

0 Likes

Hello,

- Have you ensured that the SIB initialization and start APIs are successfully completed?

- I could find that the issue is caused because of the producer socket, which is SIB socket. Try using the method mentioned in the SDK examples and check if the error exists.

EDIT: The GPIOs that have been configured using the CyU3PDeviceConfigureIOMatrix() API are part of the SIB blocks. Hence, these pins cannot be used as normal GPIOs if SIB blocks are to be used.

Best regards,

Srinath S

0 Likes