What could make my custom board not put the FX3 in Supervisor mode and/or not enable the MMU?

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

cross mob
Bashar
Employee
Employee
5 questions asked 10 sign-ins 5 sign-ins

Our application sends Alt DP video over a USB-C interface. We are trying to use an FX3 processor to be the USB host and enumerate a COTS display driver card (attached via USB-C). Our board schematic is a mashup of parts of the FX3 eval board schematic, parts of the CCG3 eval board schematic, and the rest is our own custom design. We are also using a Microblaze soft CPU core running on our FPGA to control some of the signals going to the FX3 (including PMODE and RESET).


The problem I am having is that I am unable to get the OpenOCD debugger working on our board even though it works on the FX3 eval board (OpenOCD is kicked off while running the Cypress EZ USB Suite). To remove the possibility of the problem being with my custom FX3 code I am using the Fx3TestProjBulk example project. When I run the debugger on the FX3 eval board, the code is successfully downloaded to FX3 RAM and I can step through the code. However, when I use the same project on our custom board nothing is downloaded to FX3 RAM. I'm now sending debug output to a log file, and comparing the log files from the sessions with both boards one of the first things I've noticed is that on the FX3 eval board the processor is entering Supervisor mode every time, but on the custom board it enters IRQ mode, then System mode. I've also noticed that MMU is enabled on the FX3 eval board but it is disabled on the custom board. I have compared the schematics around the FX3 on the eval board and the custom board but haven't really seen anything that I think would make a difference, but it's possible some of the pins that are set through our FPGA are being set differently.


Do you have any idea what could make my custom board not put the FX3 in Supervisor mode and/or not enable the MMU?

 

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

Hello,

To understand the issue better, please let us know the following

- Which openOCD debugger and version is being used in your application along with FX3

- Please let me know if you can test openOCD on your custom board with USBBulkSrcSink firmware (path: SDK Installation path\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples)

- Please confirm that programming through USB is successful (without using openOCD) when PMODE is set for USB boot (PMODE[2:0] = Z11)

- Please confirm if power-on-reset RC components meet the minimum reset time (1ms) 

Also, please help us by sharing the log file mentioned in the description

Regards,
Rashi
0 Likes
Bashar
Employee
Employee
5 questions asked 10 sign-ins 5 sign-ins

Hello,

I am using the OpenOCD executable that came with the EZ-USB FX3 SDK v1.3. Running the openocd executable in a command prompt window reports the version is 0.8.0 (2014-12-03-15:43).

I am able to download code to FX3 RAM using the Control Center, which I believe goes through the USB-C connector and not through the microUSB connector connected to the USB-Serial chip on the board (the one that OpenOCD goes through). When I download the cyfxbulksrcsink example project to FX3 RAM using the Control Center I see the name of the USB device change from the Bootloader device to one that matches the application I loaded. When I download the cyfxusbhost example project to FX3 RAM and then plug in a USB-C mouse I see events happening in the debug console.

I normally have the PMODE pins set to ZIZ, I2C boot with USB on fail but USB boot only also works.

I have a 10ms delay between putting the FX3 in reset and taking it out of reset.

The log file is in the zip file that I will send to the email address requested.

Thank you for your help.

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

Hello,

I have compared the schematics around the FX3 on the eval board and the custom board but haven't really seen anything that I think would make a difference, but it's possible some of the pins that are set through our FPGA are being set differently.

>> In your previous post, you mentioned that some pins are driven by FGPA. Please let me know which of the FX3 pins are driven by FPGA.

I am able to download code to FX3 RAM using the Control Center, which I believe goes through the USB-C connector and not through the microUSB connector connected to the USB-Serial chip on the board (the one that OpenOCD goes through).

>>  When FX3's RAM is programmed through control center, the programming happens over USB connected to FX3.

When I download the cyfxusbhost example project to FX3 RAM and then plug in a USB-C mouse I see events happening in the debug console.

>> Please let me know if the device enumerates when cyfxusbhost example is programmed to FX3 through Control Center. Also, please confirm this is being tested on your custom board and not on CYUSB3KIT-003. 

I understand that you want to test cyfxusbhost example on your custom board and it has some failures due to which you are trying to debug using OpenOCD. Is my understanding correct?

If yes, please let me know if your custom board design is similar to FX3 DVK (CYUSB3KIT-001). Please refer to this KBA  Testing USB Host and USB OTG examples of FX3 SDK –... - Infineon Developer Community   for more details.

The USB serial chip (CY7C65215) on CYUSB3KIT-003 is configured for JTAG and UART. Please confirm that the USB serial chip (CY7C65215) on your custom board is configured as same. You can use USB serial configuration Utility https://www.infineon.com/cms/en/design-support/tools/sdk/usb-controllers-sdk/usb-serial-software-dev...  to configure the chip.

Please let me know if I misunderstood your question or if any further queries on this

Regards,
Rashi
0 Likes
Bashar
Employee
Employee
5 questions asked 10 sign-ins 5 sign-ins

Hello,

>> In your previous post, you mentioned that some pins are driven by FGPA. Please let me know which of the FX3 pins are driven by FPGA.

Ans:  TMM – The PMODE and GPIF pins are all controlled by the FPGA, though I’m not currently doing anything with the GPIF pins. We also have an I2C interface between the FX3 and the FPGA but we won’t be using that until I can start testing my code in the debugger.

>>  When FX3's RAM is programmed through control center, the programming happens over USB connected to FX3.

Ans: TMM – thanks for the confirmation.

>> Please let me know if the device enumerates when cyfxusbhost example is programmed to FX3 through Control Center. Also, please confirm this is being tested on your custom board and not on CYUSB3KIT-003. 

Ans: TMM – the device disappears when the cyfxusbhost example is programmed to FX3 through Control Center since it’s no longer a USB device. However, when I downloaded the cyfxbulksrcsink example to FX3 RAM I did see the device name change in Control Center.

I understand that you want to test cyfxusbhost example on your custom board and it has some failures due to which you are trying to debug using OpenOCD. Is my understanding correct?

Ans: TMM – I actually have my own custom code for the FX3 that I need to debug. However, I’m starting with example code to make sure that any errors I’m getting are due to my setup and not my code.

If yes, please let me know if your custom board design is similar to FX3 DVK (CYUSB3KIT-001). Please refer to this KBA:https://community.infineon.com/t5/Knowledge-Base-Articles/Testing-USB-Host-and-USB-OTG-examples-of-F...  for more details.

Ans:  TMM = the FX3 part of the custom board was based on the FX3 DVK (CYUSB3KIT-003). Unfortunately we had missed that the OTG_ID pin needed to be tied to ground but we’re having our boards updated to make this mod (we’ve already done it on one board and I was able to confirm it worked by adding some print statements to the USB host example code). We also have a CCG3 chip and used part of the CCG3 DVK schematic for the CCG3 part of our custom board. We plugged in a USB-C monitor and it got power so we know that USB devices can be powered from our board.

The USB serial chip (CY7C65215) on CYUSB3KIT-003 is configured for JTAG and UART. Please confirm that the USB serial chip (CY7C65215) on your custom board is configured as same. You can use USB serial configuration Utility https://www.infineon.com/cms/en/design-support/tools/sdk/usb-controllers-sdk/usb-serial-software-dev... to configure the chip.

Ans:  TMM – the USB serial chip connected to the FX3 is configured for JTAG and UART. I plugged into the micro-USB connector on the DVK to verify how I needed to configure the chip on our custom board.

Thank you,

Bashar

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

Hello,

To be sure if the usbhost (default example from SDK) works fine on your custom board, please program the FX3 through the control center and share the UART debug prints. 

Also, please let  me know if you can use the default configuration file provided in FX3 SDK on your custom  board and check if the issue is reproducible

Meanwhile, I will go through the configuration file shared and let you know my comments

Regards,
Rashi
0 Likes
Bashar
Employee
Employee
5 questions asked 10 sign-ins 5 sign-ins

Hello Rashi,

I modified the usbhost example code slightly to add a bit more to the print statements so I could verify our board mode to tie the OTG_ID pin to ground was successful (which it appears it was). I downloaded the usbhost code to FX3 RAM using Control Center, then unplugged the USB-C cable that was connected to my PC and plugged in a USB-C mouse. The UART debug printouts are below:

 

UsbOtg Example

Assuming that driving CTL4 high turns VBus output ON

OTG Event: 0, Input: 1. CyU3POtgIsHostMode: 1, CyU3PUsbHostIsStarted: 0.

VBUS enable:1

OTG Event: 2, Input: 0. CyU3POtgIsHostMode: 1, CyU3PUsbHostIsStarted: 1.

OTG Event: 2, Input: 1. CyU3POtgIsHostMode: 1, CyU3PUsbHostIsStarted: 1.

 

Also, I’ve never been able to get the debugger to work no matter what configuration I use (including the default debugger configuration), so it is definitely reproducible.

 

I thought I’d mention that my real issue is that I can’t get the debugger to work with the FX3 on my custom board. In the log files I noticed the issues with the FX3 not being put in Supervisor mode and the MMU not being enabled and was wondering if that was why the debugger isn’t working. The debugger path (USB to Serial chip connected to the FX3) on our custom board is identical to the -003 DVK board. The biggest difference between our board and the DVK is that we don’t have SRAM connected to the FX3. Could that have something to do with it?

Thank you,

Bashar

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

Hello,

Please let me know if you can program custom board as FX3 device with the default USBBulkSrcSink example (Path: FX3 SDK Installation Path\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxbulksrcsink ) of the SDK. If yes, can you please try debugging USBBulkSrcSink firmware using OpenOCD and the default configuration file (.cfg) in the SDK and let me know if the issue is seen with this firmware as well? Please share the log files if the debugging fails.

This will help to understand if the issue is from the firmware side or due to some issue on the hardware side or if is it seen only when the FX3 is in Host mode. 

Also, please let me know which firmware was used to check the debugger on CYUSB3KIT-003

Regards,
Rashi
0 Likes