FX3 - FATFS Example not working.

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

cross mob
SWM
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

Hello.

I am using FX3 - CYUSB3035.  It works as the "cyfx3s_fatfs" example, but an error occurs.

* Using the example

SWM_3-1660178087264.png

 

* Block diagram of structure

SWM_0-1660177983564.png

 

* Schematic

SWM_1-1660178071190.png

SWM_2-1660178077739.png

 

* Error message

SWM_4-1660178293418.png

? : CY_U3P_ERROR_INVALID_UNIT, /**< Non-existent storage partition selected for transfer. */

I think it's the error message.

Other than the "ls" command, it doesn't work.

 

Please check if there is any problem with F/W & H/W

 

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please use the command "help" to understand the usage of  "ls" command

ls command will also expect a path to the directory as an argument. Please provide that and let me know if it works. You can also refer to readme.txt with fatfs example

Please let me know if you face any problems.

Regards,
Rashi

View solution in original post

0 Likes
5 Replies
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

Can you please confirm if J1 is the card connector or not. Also, please let us know if the card is compatible with eMMC 4.41 as FX3S is compliant to eMMC 4.41. Please refer to the datasheet which already mentions this:

https://www.infineon.com/dgdl/Infineon-CYUSB303X_EZ-USB_FX3S_SUPERSPEED_USB_CONTROLLER-DataSheet-v11...

In addition to this, can you please let us know if you have made any modifications to the "cyfx3s_fatfs" project? Also, can you confirm the error code seen? As we are not able to understand the error properly from the UART debug logs shared. 

We also understand that you are using a custom board. Please let us know if the S0 port is in use or not in your design.

Best Regards,
Jayakrishna
0 Likes

Thank you for reply.

I kown I have to use SD3.0.

SWM_2-1660207576233.png

 

J1 is SD Card connector. I'm using the SD card(SD3.0) below.

SWM_0-1660206730394.png

 

* "cyfx3s_fatfs" project modifications 

int
main (void) {

            :

io_cfg.isDQ32Bit = CyFalse;
io_cfg.s0Mode = CY_U3P_SPORT_INACTIVE;  // No use
io_cfg.s1Mode = CY_U3P_SPORT_4BIT;
io_cfg.useUart = CyTrue;
io_cfg.useI2C = CyFalse;
io_cfg.useI2S = CyFalse;
io_cfg.useSpi = CyFalse;
io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_UART_ONLY;

io_cfg.gpioSimpleEn[0] = 0;
io_cfg.gpioSimpleEn[1] = 0x02102800; /* IOs 43, 45, 52 and 57 are chosen as GPIO. */
io_cfg.gpioComplexEn[0] = 0;
io_cfg.gpioComplexEn[1] = 0;

            :

}         

 

void
CyFxUartApplnInit (void) {

            :

uartConfig.baudRate = CY_U3P_UART_BAUDRATE_115200;
uartConfig.stopBit = CY_U3P_UART_ONE_STOP_BIT;
uartConfig.parity = CY_U3P_UART_NO_PARITY;
uartConfig.flowCtrl = CyFalse;            // No use
uartConfig.txEnable = CyTrue;
uartConfig.rxEnable = CyTrue;

            :

}

 

Error code is "? : CY_U3P_ERROR_INVALID_UNIT"

 

"// No use" part was corrected. And S0 is not use.

SWM_1-1660207409466.png

S0 ports are connected the controller. But it's not use.

 

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please check the UART debug prints and confirm that all APIs pass before the enumeration tool place

Regards,
Rashi
0 Likes
SWM
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

Hello, Rashi.

All APIs pass. Anything else to check?

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please use the command "help" to understand the usage of  "ls" command

ls command will also expect a path to the directory as an argument. Please provide that and let me know if it works. You can also refer to readme.txt with fatfs example

Please let me know if you face any problems.

Regards,
Rashi
0 Likes