CyU3PSibSetIntfParams() returns ERROR_BAD_ARGUMENT

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

cross mob
Anonymous
Not applicable

I'm trying to set the intf parameters for S-Port0 as follows:

intfParams.resetGpio = 0xFF;

intfParams.rstActHigh = CyFalse;

intfParams.cardDetType = CY_U3P_SIB_DETECT_DAT_3;

intfParams.writeProtEnable = 1;

intfParams.lowVoltage = CyFalse;

intfParams.voltageSwGpio = 0xFF;

intfParams.lvGpioState = CyFalse;

intfParams.useDdr = CyTrue;

intfParams.maxFreq = CY_U3P_SIB_FREQ_52MHZ;

intfParams.cardInitDelay   = 0;

stat = CyU3PSibSetIntfParams (CY_U3P_SIB_PORT_0, &intfParams);

This is returning CY_U3P_ERROR_BAD_ARGUMENT and I don't understand why. Is there something I'm overlooking?

0 Likes
1 Solution
Keerthy_V
Moderator
Moderator
Moderator
First like given 250 sign-ins 50 solutions authored

Hi Caleb,

As per your code snippet, you are enabling the write protection on the storage port 0. GPIO used for write protection detection on Storage port 0 is GPIO 43. You need to configure this GPIO as simple GPIO in your firmware. Else the API CyU3PSibSetIntfParams will fail.

Please have a look.

View solution in original post

0 Likes
1 Reply
Keerthy_V
Moderator
Moderator
Moderator
First like given 250 sign-ins 50 solutions authored

Hi Caleb,

As per your code snippet, you are enabling the write protection on the storage port 0. GPIO used for write protection detection on Storage port 0 is GPIO 43. You need to configure this GPIO as simple GPIO in your firmware. Else the API CyU3PSibSetIntfParams will fail.

Please have a look.

0 Likes