Cannot program device after enabling protection + GPIO (instead of debug)

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

cross mob
DaGa_4378306
Level 4
Level 4
10 replies posted 5 replies posted 5 questions asked

I'm having trouble with the programming my devices.  I in the final stage of delivering a *.hex to the factory for my device, and I want to lock it down:

  • I enabled "protection" on the system tab
  • I moved to "GPIO" on the Debug options

This is using a PSOC4 214015-01 module.

I was able to program the device from PSOC 4.3 Creator, but now I can't no longer get access to to the device and erase it.  Neither PSOC Creator, or PSOC Programmer is able to connect to the device!!

When you select the "GPIO" option, it says in the text that you can still connect with SWD for programming.

0 Likes
1 Solution

So I tried changing mode on the kit, but it didn't help.

I finally just purchased the MiniProg3 device, and I was able to erase the device after the GPIO and protected options we set.

View solution in original post

0 Likes
7 Replies
DaGa_4378306
Level 4
Level 4
10 replies posted 5 replies posted 5 questions asked

This is what is says under the "Programming/Debugging:Debug Select" pin in the System tab

"Controls whether or not to reserve pins for debugging. If SWD is selected, the debugging features of the chip will be externally accessible. If GPIO is selected the pins are available for general purpose use. When set to GPIO the device can still be acquired with SWD, and reprogrammed, but not for debugging. For more information see the device datasheet or Technical Reference Manual (TRM)."

0 Likes

Hi DaGa_4378306​,

I enabled "protection" on the system tab

Can you please let me know the Chip Protection option that you selected? Setting it to the "Protected" state should allow you to reprogram the device after an Erase All Flash action.

I was able to program the device from PSOC 4.3 Creator

To program protection settings you need to use PSoC Programmer after enabling the "Chip Lock" programming option instead of PSoC Programmer. I tried repeating the steps that you performed and I am able to program the device after performing a complete erase of the device.

Is PSoC Creator able to detect/display the device when you try programming the device?

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes

Yes, I selected "Protected" in the device.

One other piece of info - I'm using the CY8CKIT-042 for my programmer.  I pick up and SWDIO/SWCDLK/XRES pins from there.

The kit does not even see the device (Programmer or PSOC Creator). Is there a HW issue with the CY8CKIT to toggle SWD fast enough to use it?

0 Likes

Here is a similar report of the problem.  I'm also seeing seeing CMSIS-DAP Version 1.0.  It would seems that my KitProg is not doing the proper steps to acquire the SWD port after reset?  How do I upgrade the CMSIS-DAP version on the CY8CKIT-042 board?

PSoC 4 not programmable after debug select gpio

0 Likes

I upgraded my Psoc Programmer, but found this in the notes:

The following are the known limitations in PSoC Programmer 3.29.0:

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 Cypressspecific 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

0 Likes

Hi DaGa_4378306,

Is your KitProg in Mass Storage Programmer mode? The KitProg's status LED should be ON (without blinking) in normal mode.

If it is blinking, can you please try the steps mentioned in the last comment of this thread and let me know if that helps - Re: PLD Path

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes

So I tried changing mode on the kit, but it didn't help.

I finally just purchased the MiniProg3 device, and I was able to erase the device after the GPIO and protected options we set.

0 Likes