完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我在HSMC FPGA夹层板上使用超高速探险家工具包。
我已经加载了UART示例(1),它正在工作。任何我进入/DEV/TTYACM0的东西都会在工具箱的其他UART上观察到。 不过,我想让UART在FPGA上使用夹层销。我已经将源代码更改为: CYU3PMESET((UIT88T**)和;IOIF CFG,0,SIZEOF(IO-CFG); IOFCFG.ISDQ32位=CyFLY; IOFCFG.S0MODE=CYU-U3PL运动活性; IOFCFG S1MODE=CYU-U3PL运动活性; IO.CFUG UUEART=CyTrand; IOFCFG.UIE2C=CyFrE; IOFCFGUSE2S=CyFrE; IOICFG.UESSPI=Cytru. IOFCFG.LPPMODE=CyuU3pIIO-MatRIX-LPPH默认; IOFCFG GPIOSLIMEN〔0〕=0; IOFCFG GPIOSLIMEN〔1〕=0; IOFCFG。GPIO-络合〔0〕=0; IOFCFG。GPIO-络合〔1〕=0; 状态= CYU3PDEVICECOMPIORIICOMATRIX(和;IOYCFG); 据我理解,这将导致UART TX移动到GPIO48/DQ30,RX移动到GPIO49/DQ31。然而,我似乎无法让它发挥作用。当我在/DEV/TTACACM0上传输数据时,我没有观察到GPIOS94/DQ31引脚的任何变化。我还把RX链接到FPGA中的TX,并希望能返回我发送的任何内容。 以上设置是否正确使用GPIO 48/49? 1) HTTP://www. CyPress .COM/DCONtiSO/CODE-ExpRES/EZ-UB-FX3-UB-UART桥接示例 以上来自于百度翻译 以下为原文 I'm using a SuperSpeed Explorer Kit on a HSMC FPGA mezzanine board. I've dowloaded the UART example(1), and it's working. Anything I enter on /dev/ttyACM0 will be observed on the kit's other UART. However, I would like to make the UART to use the mezzanine pins on the FPGA. I've changed the source code to this: CyU3PMemSet((uint8_t *)&io_cfg,0,sizeof(io_cfg)); To my understanding this should cause the UART TX to be moved to GPIO48/DQ30, and RX to GPIO49/DQ31. However, I can't seem to get it to work. I don't observe any change on the GPIO_49/DQ31 pin when I transmit data on /dev/ttyACM0. I've also looped rx to tx in the FPGA and would expect to get back whatever I transmitted. Is the above settings correct to use GPIO 48/49? 1) http://www.cypress.com/documenta ... uart-bridge-example |
|
相关推荐
4个回答
|
|
|
请参阅“表7”。CYSUB3012和CYSUB3014引脚列表“在FX3的数据表中”。
CYSUB301X,CYSB201X:EZ-USB®FX3:超高速USB控制器CyPress半导体 在该表中,描述了UART-TX和-RX可以被分配给GPIO[48∶49 ]的情况。 但是有一个条件,FX3被配置为使用16位总线GPIF、UART、SPI和I2S。当满足此条件时,UART-TX和-RX被分配给GPIO[48∶49 ]集USE2S作为CyrEnter。 此外,将LPPMODE设置为CyuU3pIIO-MatRIX-LPPIH默认值,以启用所有低性能外围设备(LPP)接口。请参考“安装在FX3SDK的EZ-USB®FX3SDK固件API指南”文档中的“5.112.2 TyPulfEnUM CUU3PIOMATHLXLPPMODEDET CYU3PIOMARTXLPPLMODEDET”部分,以了解更多细节。 当做, 诺里基 以上来自于百度翻译 以下为原文 Please refer the "Table 7. CYUSB3012 and CYUSB3014 Pin List" in the FX3's datasheet. CYUSB301X, CYUSB201X: EZ-USB® FX3: SuperSpeed USB Controller | Cypress Semiconductor In this table, it is described that the UART-TX and -RX can be assigned to the GPIO[48:49] in a case. But there is a condition that the FX3 is configured as using 16-bit bus GPIF, UART, SPI and I2S. When this condition is met, the UART-TX and -RX are assigned to GPIO[48:49] Set useI2S as cyTrue. In addition, set lppMode as CY_U3P_IO_MATRIX_LPP_DEFAULT to enable all Low Performance Peripheral (LPP) interfaces. Please refer the section "5.11.2.2 typedef enum CyU3PIoMatrixLppMode_t CyU3PIoMatrixLppMode_t" in the "EZ-USB® FX3 SDK Firmware API Guide" document installed with the FX3 SDK for more details. Regards, Noriaki |
|
|
|
|
numuwewr 发表于 2018-12-14 20:03 在我最近的测试中,我使用以下内容: /*配置IO矩阵*/ CYU3PMESET((UIT88T**)和;IOIF CFG,0,SIZEOF(IO-CFG); IOFCFG.ISDQ32位=CyFLY; IOFCFG.S0MODE=CYU-U3PL运动活性; IOFCFG S1MODE=CYU-U3PL运动活性; IO.CFUG UUEART=CyTrand; IOFCFG.UIE2C=CyFrE; IIF CFU.2Is=Cyress; IOICFG.UESSPI=Cytru. IOFCFG.LPPMODE=CyuU3pIIO-MatRIX-LPPH默认; IOFCFG GPIOSLIMEN〔0〕=0; IOFCFG GPIOSLIMEN〔1〕=0; IOFCFG。GPIO-络合〔0〕=0; IOFCFG。GPIO-络合〔1〕=0; 状态= CYU3PDEVICECOMPIORIICOMATRIX(和;IOYCFG); 我假设OYCFG.ISDQ32位=CyFeSE是指16位GPIF。但我仍然没有得到GPIO48切换时,我发送。回到另一个UART工作很好。 以上来自于百度翻译 以下为原文 In my latest test I was using the following: /* Configure the IO matrix */ CyU3PMemSet((uint8_t *)&io_cfg,0,sizeof(io_cfg)); io_cfg.isDQ32Bit = CyFalse; io_cfg.s0Mode = CY_U3P_SPORT_INACTIVE; io_cfg.s1Mode = CY_U3P_SPORT_INACTIVE; io_cfg.useUart = CyTrue; io_cfg.useI2C = CyFalse; io_cfg.useI2S = CyTrue; io_cfg.useSpi = CyTrue; io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_DEFAULT; io_cfg.gpioSimpleEn[0] = 0; io_cfg.gpioSimpleEn[1] = 0; io_cfg.gpioComplexEn[0] = 0; io_cfg.gpioComplexEn[1] = 0; status = CyU3PDeviceConfigureIOMatrix (&io_cfg); I assume that o_cfg.isDQ32Bit = CyFalse means 16-bit GPIF. But I still don't get GPIO48 to toggle when I transmit. Going back to the other UART works fine. |
|
|
|
|
chm1 发表于 2018-12-14 20:13 示例项目“UBFlash Prog”使用SPI和UART都具有相似的条件。 下面是示例项目中的IO矩阵配置。 *配置设备的IO矩阵。在FX3 DVK板上,COM端口 *连接到IO(53:56)。因此,既然我们需要使用SPI,我们将不得不 *要么不使用UART,要么在IO上使用外部UART控制器(46:49)。*/ CYU3PMESET((UIT88T**)和;IOIF CFG,0,SIZEOF(IO-CFG); IOFCFG.ISDQ32位=CyFLY; IOFCFG.S0MODE=CYU-U3PL运动活性; IOFCFG S1MODE=CYU-U3PL运动活性; IO.CFUG UUEART=CyTrand; IIF CFU.UII2C=Cytru. IOFCFGUSE2S=CyFrE; IOICFG.UESSPI=Cytru. IOFCFG.LPPMODE=CyuU3pIIO-MatRIX-LPPH默认; /*没有启用GPIOS。*/ IOFCFG GPIOSLIMEN〔0〕=0; IOFCFG GPIOSLIMEN〔1〕=0; IOFCFG。GPIO-络合〔0〕=0; IOFCFG。GPIO-络合〔1〕=0; 状态= CYU3PDEVICECOMPIORIICOMATRIX(和;IOYCFG); 与代码不同的是I2C,而不是I2S。 我有另一个要求。请查看UART配置部分,以确保“FultCcRL”被禁用。如果启用“流CCTRL”,则必须控制CTS或未观察到UART-TX波形。 CYU3PMESET((UIT88T**)和UARTCONFIG,0,SIZEOF(UARTCONFIG)); UARTCONTUR.BUDERATE = CYU-U3PUUARTH BAUDRATET11500; UARTCONTION STOBIT = CYU-U3PUUARTHONEONI STORYBIT; UARTCONTION =奇偶= CYU-U3PUUARTHONNOY奇偶校验; UARTCONT.TXNET= CyTrand; UARTCONTRO.RXPENTITY = CyFLUE; UARTCONTIONFROCCTRL = CyFLUE; UARTCONDS.ISDMA=CyTrand; 状态= CYU3PUARTSETCONFIG(&;UARTCONFIG,NULL); 当做, 诺里基 以上来自于百度翻译 以下为原文 The example project "USBFlashProg" has similar condition using both SPI and UART. Following is the IO Matrix configuration from the example project. /* Configure the IO matrix for the device. On the FX3 DVK board, the COM port * is connected to the IO(53:56). So since we need to use SPI, we will have to * either not use UART or use an external UART controller on the IO(46:49). */ CyU3PMemSet ((uint8_t *)&io_cfg, 0, sizeof(io_cfg)); io_cfg.isDQ32Bit = CyFalse; io_cfg.s0Mode = CY_U3P_SPORT_INACTIVE; io_cfg.s1Mode = CY_U3P_SPORT_INACTIVE; io_cfg.useUart = CyTrue; io_cfg.useI2C = CyTrue; io_cfg.useI2S = CyFalse; io_cfg.useSpi = CyTrue; io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_DEFAULT; /* 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); The difference from your code is I2C is enabled instead of I2S. I have an another request. Please look at the UART configuration part to ensure the "flowCtrl" is disabled. If the "flowCtrl" is enabled, CTS must be controlled or the UART-TX waveform is not observed. CyU3PMemSet ((uint8_t *)&uartConfig, 0, sizeof (uartConfig)); uartConfig.baudRate = CY_U3P_UART_BAUDRATE_115200; uartConfig.stopBit = CY_U3P_UART_ONE_STOP_BIT; uartConfig.parity = CY_U3P_UART_NO_PARITY; uartConfig.txEnable = CyTrue; uartConfig.rxEnable = CyFalse; uartConfig.flowCtrl = CyFalse; uartConfig.isDma = CyTrue; status = CyU3PUartSetConfig (&uartConfig, NULL); Regards, Noriaki |
|
|
|
|
chm1 发表于 2018-12-14 20:13 通过以上,我可以观察到信号在StaltTAP逻辑分析仪中的引脚。循环RX/TX也可以工作。谢谢你的帮助。 以上来自于百度翻译 以下为原文 With the above I can observe the pin in the signaltap logic analyzer. Looping rx/tx also works. Thank you for your help. |
|
|
|
|
只有小组成员才能发言,加入小组>>
788个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7386 浏览 0 评论
2490 浏览 1 评论
2183 浏览 1 评论
4046 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2093 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7871浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
6434浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
760浏览 2评论
735浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
8288浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-14 16:18 , Processed in 0.729757 second(s), Total 80, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2520