How to print debug information ?

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

cross mob
Anonymous
Not applicable

From the docs cypress released about CYusb3014 DVK,  I can not found how  to print  logs in firmware . 

   

I found there is a com and a jtag,  because I have no openice ,so I connect the com teminal to my PC , but there are no logs print .

   

How can I get the logs? Thanks

0 Likes
20 Replies
Anonymous
Not applicable

Hi,

   

have you checked, that you are using the correct UART port? FX3 has two ways where the UART is at the I/O pins. That depends on configuring the GPIF to 16- or 32-bit. Check datasheet...

   

 

   

Are you using the DVK board from cypress?

   

Then check the schematic if your jumper settings are correct. Give some more description about your hardware and the GPIF configuration (16- or 32-bit) then we may can help you more.

   

regards,

   

lumpi

0 Likes
Anonymous
Not applicable

Hi,

   

have you checked, that you are using the correct UART port? FX3 has two ways where the UART is at the I/O pins. That depends on configuring the GPIF to 16- or 32-bit. Check datasheet...

   

 

   

Are you using the DVK board from cypress?

   

Then check the schematic if your jumper settings are correct. Give some more description about your hardware and the GPIF configuration (16- or 32-bit) then we may can help you more.

   

regards,

   

lumpi

0 Likes
Anonymous
Not applicable

 Please check UART-SPI Jumpers (J101,J102,J103,J104) on the DVK. They must be in 1 & 2 position.

   

Also set the baud to 115200 in the terminal application on the host pc.

   

 

   

Thanks

   

Nikhil

0 Likes
Anonymous
Not applicable

 Dear madam/sir,

   

     Yes ,  I used the DVK from cypress.   How to see the GPF is 16 bit or 32  bit?

   

     From DVK_guide.pdf, I short the 1-2 pins in jumper Pins  J101,J102,J103 and J104  which means UART_RTS, UART_CTS,UART_TX, UART_RX.   But ,  there are no logs print in com yet. 

   

   The usb connector  chip  is CYUSB 3014. 

   

 Thanks

0 Likes
Anonymous
Not applicable

Hi,

   

 

   

to see if 16- or 32 bit, check following at initialising code....

   

 

   

    CyU3PIoMatrixConfig_t io_cfg;
    CyU3PMemSet ((IS_U8*)&io_cfg, 0, sizeof(CyU3PIoMatrixConfig_t));
 

   

 

   

// GPIF II is in 16-bit Mode used
    io_cfg.isDQ32Bit = IS_FALSE;

   

 

   

// GPIF II is in 32-bit Mode used
    io_cfg.isDQ32Bit = IS_TRUE;

   

 

   

refer to the data sheet page 16 Table 7. (data sheet revision 001-52136 Rev. *N).

   

 

   

In case of 16-bit the GPIO 46, 47, 48, 49 are used for UART.

   

 

   

In case of 32-bit the GPIO 53, 54, 55, 56 are used for UART.

   

 

   

regards,

   

lumpi

   


0 Likes
Anonymous
Not applicable

 Dear  lumpie,

   

 The source code initial the GPF is list :

   

     /* Configure the IO matrix for the device. On the FX3 DVK board, the COM port 

   

     * is connected to the IO(53:56). This means that either DQ32 mode should be

   

     * selected or lppMode should be set to UART_ONLY. Here we are choosing

   

     * UART_ONLY configuration. */

   

    io_cfg.isDQ32Bit = CyFalse;

   

    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;

   

    /* No GPIOs are enabled. */

   

    io_cfg.gpioSimpleEn[0]  = 0;

   

    io_cfg.gpioSimpleEn[1]  = 0;

   

    io_cfg.gpioComplexEn[0] = 0;

   

    io_cfg.gpioComplexEn[1] = 0;

   

    status = CyU3PDeviceConfigureIOMatrix (&io_cfg);

   

   

   

  How to set the  arrays gpioSimpleEn and gpioComplexEn  to enable the  GPIO IO(53:56) ??

   

 

   

  Then from the uart interface  chapter of  datasheet   in page 8  table1 UART Interface Signals:

   

Table 1. UART Interface Signals

   

Signal Description

   

TX Output signal

   

RX Input signal

   

CTS Flow control

   

RTS Flow control

   

 

   

So how can I to set the jumpers (J101,J102,J103,J104) ?

   

 

   

Thanks 

0 Likes
Anonymous
Not applicable

Hi,

   

if you are using the peripheral UART as you described, then it results in an error if you also configure the gpioSimpleEn[0..1] and/or gpioComplex[0..1] through the array . You do not want to use them as GPIO! So these bits has to be zero for the UART ports you are using.

   

 

   

regards,

   

lumpi

0 Likes
Anonymous
Not applicable

Hi,

   

set the jumpers as described in the schematic of the DVK board of FX3. Search at the cypress homepage for that documentation. If you won't find then I may can append it here.

   

regards,

   

lumpi

0 Likes
Anonymous
Not applicable

Hi,

   

set the jumpers as described in the schematic of the DVK board of FX3. Search at the cypress homepage for that documentation. If you won't find then I may can append it here.

   

regards,

   

lumpi

0 Likes
Anonymous
Not applicable

Hi  Lumpi6,

   

   I have set the jumpers as the  DVK guide doc.  But there are no logs print in  Com termination(115200, com1 , 8 bytes  RTS/CTS).  Thanks .  

0 Likes
Anonymous
Not applicable

Hi,

   

the jumpers have to be at position [1-2]. And the GPIF has to be configured to 32-bit mode on the DVK board to use GPIO's 53...56. You can not use the SPI peripheral interface in case of using GPIF in 32-bit, you need to switch to 16-bit mode if you want to use SPI.

   

 

   

If that won't help, then debug if any error happens while initialising or measure at the jumper pins at connector 2 (in the middle) with the oscilloscope if there is a signal...

   

regards,

   

lumpi

0 Likes
Anonymous
Not applicable

Hi,

   

the jumpers have to be at position [1-2]. And the GPIF has to be configured to 32-bit mode on the DVK board to use GPIO's 53...56. You can not use the SPI peripheral interface in case of using GPIF in 32-bit, you need to switch to 16-bit mode if you want to use SPI.

   

 

   

If that won't help, then debug if any error happens while initialising or measure at the jumper pins at connector 2 (in the middle) with the oscilloscope if there is a signal...

   

regards,

   

lumpi

0 Likes
Anonymous
Not applicable

 Hi,         I have  confirmed  that the jumper  is connected  right !!!  and the initial code have cpyied in the former post. pls refer to that post  "in red charactors "  !   And   all of those code segment  is copied from the source code  which located in sdk location firmware sample  "uvc sample".        

0 Likes
Anonymous
Not applicable
        Hi, the ioconfig struct variable ... has to be set like io_cfg.isDQ32Bit = CyTrue; to use GPIF in 32 bit. Then on the SPI lines the UART is present!!!! what you wrote with the red letters there all the time is this variable initialized with CyFalse!!!!! regards, lumpi   
0 Likes
Anonymous
Not applicable
        Hi, the ioconfig struct variable ... has to be set like io_cfg.isDQ32Bit = CyTrue; to use GPIF in 32 bit. Then on the SPI lines the UART is present!!!! what you wrote with the red letters there all the time is this variable initialized with CyFalse!!!!! regards, lumpi   
0 Likes
Anonymous
Not applicable

Hi,

   

how is it going? Is the UART now working?

   

regards,

   

lumpi

0 Likes
Anonymous
Not applicable
        OK , I got it, Thanks!   
0 Likes
Anonymous
Not applicable

Hi,

   

awesome, much success in developing your application.

   

regards,

   

lumpi

0 Likes
Anonymous
Not applicable

Hi,

   

awesome, much success in developing your application.

   

regards,

   

lumpi

0 Likes
Anonymous
Not applicable

Thank you . 

   

 

   

but I found it is not easy to develop with your chip........

0 Likes