CY8C4014LQI-421编程调试连接失败问题

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

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

cross mob
wangsen
Level 1
Level 1
5 sign-ins First reply posted First question asked

我使用CY8C4014LQI-421设计产品,该MCU上没有XRES,使用CY8CKIT-042上的板载编程器连接SWDIO\SWCLK进行调试,发现无法连接,CREATOR无法发现设备。我还可以用什么设备对它进行调试呢?

0 点赞
1 解答

Hello.

If using PSoC SWD pins as alternate GPIO function, Miniprog3, Miniprog4, Kitprog2, Kitprog3, do not work with PSoC that does not have XRES pin.  Kitprog from KIT-059, KIT042, will work because they do not use CMSIS-DAP.

See following discussions trying to make Miniprog4 work with Power Cycle when PSoC uses alternate GPIO function on SWD pins.
This is very long thread...
Solved: CY8C4014SXI-420 only able to succesfully program o... - Cypress Developer Community

And another thread...
Solved: Re: MiniProg4 Power Toggle not able to program Cy8... - Cypress Developer Community

Miniprog(x) and Kitprog(x) are great for programming and debugging, but there are some limitations.  With additional hardware, they can support programming of PSoC without XRES pin.

在原帖中查看解决方案

11 回复数
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

1: CY8CKIT-042 上面的Kitprog不太方便引出了调试其它的device。

2:目前官方提供的两种开发工具分别为:CY8Ckit-002

https://www.cypress.com/documentation/development-kitsboards/cy8ckit-002-psoc-miniprog3-program-and-...

2:CY8CKIT-005

https://www.cypress.com/documentation/development-kitsboards/cy8ckit-005-miniprog4-program-and-debug...

 

 

0 点赞
wangsen
Level 1
Level 1
5 sign-ins First reply posted First question asked

这两个工具的SWD连接需要连XRES,而我使用的是CY8C4014LQI-421的QFN16封装,该封装没有XRES引脚,只连接DIO与CLK可以吗?

0 点赞
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

See following example of programming without XRES using Kitprog from KIT-059.
Solution: Use Kitprog to Program PSoC 4000 without... - Cypress Developer Community

The example should work for debugging as well, but I've not tried debugging.

Good luck with your project.

Vison_Zhang
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 250 sign-ins

CY8CKIT-042 的板上编程器 KitProg 由于硬件限制默认只支持 Reset Programming Mode,也就是说只能用来烧录带 XRES 引脚的 PSoC4 芯片,通过 控制 XRES 引脚来复位目标芯片,并在复位之后通过 SWD 获取芯片。

确实 XRES 引脚的芯片是需要编程器通过控制器掉电-上电动作来复位目标芯片的,但是 Kitprog 没有硬件支持这个操作,所以无法支持 Power Cycle Programming Mode.

目前支持 Power Cycle Programming Mode 的官方工具有 Miniprog3 和 Miniprog4(CY8CKIT-002/-005),如果需要购买的话我推荐 Miniprog4.

如果你有时间和工作环境可以对 KitProg 做硬件 rework 的话,可以考虑试一下通过XRES信号控制一个 MOSFET 进而控制目标芯片的上电状态来实现  power cycle 的动作。或者试一下上面帖子中的类似方法。

 

0 点赞

Hello.

If using PSoC SWD pins as alternate GPIO function, Miniprog3, Miniprog4, Kitprog2, Kitprog3, do not work with PSoC that does not have XRES pin.  Kitprog from KIT-059, KIT042, will work because they do not use CMSIS-DAP.

See following discussions trying to make Miniprog4 work with Power Cycle when PSoC uses alternate GPIO function on SWD pins.
This is very long thread...
Solved: CY8C4014SXI-420 only able to succesfully program o... - Cypress Developer Community

And another thread...
Solved: Re: MiniProg4 Power Toggle not able to program Cy8... - Cypress Developer Community

Miniprog(x) and Kitprog(x) are great for programming and debugging, but there are some limitations.  With additional hardware, they can support programming of PSoC without XRES pin.

lock attach
Attachments are accessible only for community members.
Vison_Zhang
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 250 sign-ins

I don't saw any issue when  try to program PSoC4000 devices without XRES pin use Miniprog3, even when config SWD pins to GPIO mode.  

Miniprog4/KitProg3 cannot  program PSoC4000 devices without XRES pin when config SWD pins to GPIO mode.  This issue have been reported to internal software team, it is turns out a defect of Kitprog3 firmware(v2.0x and v2.1x). This behavior is a regression after implementation of CMSIS-DAP vendor command 0x91 SetAcquireTimeout. The acquisition timeout was incorrectly estimated for the case PSoC4 with power acquire. For some PSoC4 dies, the timeout was too early. This defect will be fixed in PP3.29.1 with KitProg3 V2.2x.

 I tried overwrite kitprog3_1.cyacd file inside PSoC Programmer install path with kitprog3_1.cyacd v1.20 and withdraw kitprog3 firmware of Miniprog4 to 1.20, it works well.  I think this can be used as a temporary workaround before PP3.29.1 release.

 

 

0 点赞

Hello Vison.

I think you've verified my observations.

Here's text from release notes of PSoC Porgrammer 3.29.0 002-31095.
When using standard CMSIS-DAP programmer/debugger, the device flash should be erased or
contain an application that has SWD or JTAG selected in PSoC Creator ('Debug Select' option in
System Tab). When GPIO is selected in this option, debug pins are disabled in start-up code of
user application. PSoC Programmer or 3rd party tools then cannot access the device. The only
option for accessing the device, when debug pins are configured as GPIO, is to enter Cypress specific Test Mode, which is not supported with standard CMSIS-DAP transport. This can be
done using following programmers: MiniProg3, MiniProg4, KitProg3 and using KitProg1 or
KitProg2 in proprietary mode.

Too bad there are no details on how to enter/use "Cypress specific Test Mode", nor "proprietary mode".

And, since no workarounds are published, other than what you have graciously provided, I only recommend solutions that are known to work.  That said, all feedback is always welcome.

0 点赞
wangsen
Level 1
Level 1
5 sign-ins First reply posted First question asked

从应用手册中发现了另一种接法,经测可用,如下图:

wangsen_0-1615781632038.png

 

0 点赞
Vison_Zhang
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 250 sign-ins

我没理解,你不会是把  Host Programmer 的 XRES 脚接到芯片的 VDDD上了吧?

0 点赞
wangsen
Level 1
Level 1
5 sign-ins First reply posted First question asked

是的,CY8C4014LQI-421的设计中,VDD引脚只接了一个电容,我把cy8ckit-042仿真口的XRES与之相连后,可以正常烧写程序了。

这有什么问题吗?

 

0 点赞
Vison_Zhang
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 250 sign-ins

没什么问题,Host Programmer(KitProg) 的XRES 输出引脚的驱动能力直接用作芯片 VDDD供电源的话驱动能力不是很充足,但是既然验证是成功的,也没有什么问题。但是这种方法用在开发阶段是OK的,批量烧录的话还是建议通过一个三极管增强 XRES 输出的驱动能力,这样就没有任何顾虑了。

你尝试的这种方法对很多爱好者来说是非常好的信息啊,牛!

0 点赞