Hi, thank you so much for taking the time in replying. can you elaborate on the answer I have used the same code by modifying syntaxes for esp32 Arduino ide, but it is not able to achieve all the steps. can you suggest how can I move further.
I have only a relatively small knowledge about the ESP32. I'm not sure how I can help you. I was monitoring your original discussion about the ESP32 and the PSoC and found the link that MIGHT be related to your inquiry.
In your previous post, you mentioned that you were able to successfully program PSoC 5 LP device using another PSoC 5 LP. As you have a logic analyzer, comparing the traces to figure out at what point the process is failing might help.
I would assume from your previous email the link I provided: esp32 bootloader did not help.
You might consider trying to contact the person in the link who got his/her ESP32 to program. He/She might have some clues how to help you further.
The 5LP tech ref manual (TRM) has very good info on how to establish a connection to 5LP, erasing, programming FLASH.
Look at Section G, chapter 39 and 41. Concentrate on SWD interface.
For even more detail, with timing info, is found in 5LP programming document:
You should verify esp32 is meeting the setup and hold time specification on the SWDIO pin relative to the SWDCLK pin. SWDIO timing is quite critical, especially when turning the direction of this bi-directional pin.
As Rakshith mentioned, you can compare 5LP to 5LP programming logic analyzer trace with that of esp32 to 5LP trace. With the two documents listed here, you'll be able to find exactly where the SWD programming protocol fails (since these doc's also show a successful trace).