apiRetStatus is 68

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

cross mob
gean_3054931
Level 5
Level 5
10 likes given 5 likes given First like received

Hello,

I initialise the api sibinit(0); in my application.the apiRetStatus returning 68.what does mean?

thank you.

0 Likes
1 Solution

Hello,

The main function initializes the GPIOs 43, 44, 45 as simple GPIOs but these GPIO pins are part of the storage port S0 block. Hence, the CyU3PSibInit(0) API called after the CyU3PGpioInit() API would fail. Please modify the GPIO pins that are used in the application.

Also, if you are looking for a mass storage application using the storage ports, use an example firmware that involves the implementation of storage ports. (Eg. FX3SMassStorage example in FX3 SDK).

Best regards,
Srinath S

View solution in original post

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

Hello,

CyU3PSibInit() API returns either CY_U3P_SUCCESS (or) CY_U3P_ERROR_SIB_INIT. CY_U3P_ERROR_SIB_INIT corresponds to an error code 0x6E. Please let me know if this the API that you are using and if you are checking the proper error status. Please share the code snippet if possible.

Best regards,

Srinath S

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

Hello shrinath,

I have shared code snippet.

thank you.

0 Likes

Hello,

- Upon looking into the API source, I found that CyU3PSibInit() API also has a return code CY_U3P_ERROR_NOT_CONFIGURED (Error Code: 68). Apologies for not mentioning this earlier. This error code is returned when the s0Enabled parameter of the CyU3PSibGlobalData structure is not set to CyTrue. In order to set this parameter to CyTrue, the firmware must include the cyu3sibpp.h file and invoke the CyU3PSibSetS0Enabled() function.

- As an alternate step, use the initialization procedures followed in the mass storage examples that are provided with the FX3 SDK and let me know if there are any failures.

Best regards,

Srinath S

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

Hello shrinath,

I have used CyU3PSibSetS0Enabled() as follows.

CyU3PSibSetS0Enabled();

  apiRetStatus = CyU3PSibInit(0);

    if (apiRetStatus != CY_U3P_SUCCESS)

        {

            // Error handling

            CyU3PDebugPrint (4, "SIB initialisation failed, error code = %d\n",apiRetStatus);

            CyFxAppErrorHandler(apiRetStatus);

        }

After this coe included,program is hanging at  apiRetStatus = CyU3PSibInit(0) and not showing apiRetStatus  value.

thank you

0 Likes

Hello,

- If the firmware is loaded into the device, do you see that the firmware is getting stuck at the CyU3PSibInit() API? Do you not see any UART debug prints after that API call?

- Have you tested using the SIB initialization sequence used in the FX3 SDK examples?

Best regards,
Srinath S

0 Likes

Hello,

this is how i initialising the sdcard.

firmware is getting stuck at the CyU3PSibInit() API.my hardware doesnot support for uart.

CyU3PSibSetS0Enabled()  ;

   apiRetStatus = CyU3PSibInit(0);                                                        

    if (apiRetStatus != CY_U3P_SUCCESS)

        {

            // Error handling

            CyU3PDebugPrint (4, "SIB initialisation failed, error code = %d\n",apiRetStatus);

            CyFxAppErrorHandler(apiRetStatus);

        }

    apiRetStatus = CyU3PSibStart();

    if (apiRetStatus != CY_U3P_SUCCESS)

        {

            /* Error handling */

            CyU3PDebugPrint (4, "SIB start failed, error code = %d\n",apiRetStatus);

            CyFxAppErrorHandler(apiRetStatus);

        }

    intfCfg.resetGpio=0XFF;

    intfCfg.rstActHigh=CyFalse;

    intfCfg.writeProtEnable =CyFalse;

    intfCfg.lowVoltage   =CyFalse;

    intfCfg.useDdr  =CyFalse;

    intfCfg.cardDetType =CY_U3P_SIB_DETECT_DAT_3;

    intfCfg.voltageSwGpio =0xFF;

    intfCfg.lvGpioState =CyFalse;

    intfCfg.maxFreq =CY_U3P_SIB_FREQ_20MHZ;

    intfCfg.cardInitDelay   = 0;

    apiRetStatus=CyU3PSibSetIntfParams(0,&intfCfg);

0 Likes

Hello,

The main function initializes the GPIOs 43, 44, 45 as simple GPIOs but these GPIO pins are part of the storage port S0 block. Hence, the CyU3PSibInit(0) API called after the CyU3PGpioInit() API would fail. Please modify the GPIO pins that are used in the application.

Also, if you are looking for a mass storage application using the storage ports, use an example firmware that involves the implementation of storage ports. (Eg. FX3SMassStorage example in FX3 SDK).

Best regards,
Srinath S

0 Likes

Hello shrinath,

Also, if you are looking for a mass storage application using the storage ports, use an example firmware that involves the implementation of storage ports. (Eg. FX3SMassStorage example in FX3 SDK).

-> I am not looking for a mass storage application.

After modifying the code as you said,endpoint renumeration is not hapenning.

and CyU3PDeviceConfigureIOMatrix is returning CY_U3P_SUCCESS.

    io_cfg.gpioSimpleEn[0]  = 0;

    io_cfg.gpioSimpleEn[1]  = 0;

    io_cfg.gpioComplexEn[0] = 0;

    io_cfg.gpioComplexEn[1] = 0;

    status = CyU3PDeviceConfigureIOMatrix (&io_cfg);

    if (status != CY_U3P_SUCCESS)

    {

        goto handle_fatal_error;

    }

thank you.

0 Likes

Hello,

- What do you mean by "Endpoint re-enumeration is not happening"? Do you mean to say that the device is not getting detected on the host. After making the mentioned changes on the GPIO, what is the API that shows error?

- Since you have mentioned that it is not mass storage application, please let me know if you are implementing the storage application over the vendor mode.

Best regards,

Srinath S

0 Likes

Hello

What do you mean by "Endpoint re-enumeration is not happening"? Do you mean to say that the device is not getting detected on the host. After making the mentioned changes on the GPIO

->YES.

what is the API that shows error?

->There is no return error.

please look for all threads that tells my requirements.

FX3 INTERFACE WITH SDCARD

fx3 sdcard file system

sdcard write and read

fx3 sdcard

sd card

fx3s slavefifo and gpifstorage

Thank you.

0 Likes

Hello,

After making the changes mentioned in the response 7, the CyU3PSibInit(0) API returned success and the device enumerated fine. Can you please add debug prints/ CyU3PDeviceReset() API in the firmware to identify where there is an error? Is the firmware control getting into the application thread entry initially?

Best regards,

Srinath S

0 Likes