Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

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

Hello,
We had encoders failed from our supplier, and they are using CY8C5888NI-LP210 microcontroller.

What is failed is quadrature outputs on P12[4], P12[5],P12[3],P12[2],P4[3] and so on.

Problem is that encoder dues seems to be working, it is indicating error and index values with LED correctly but quadrature is missing completely .

What I want to do is to reprogram this encoder so it would generate constant PWM signal on pins. If signal does not exist, that means we killed encoder, if signal does exist, it means that firmware was corrupted somehow and encoder producer should be at fault, not us.

I written application, but it could be uploaded only by I2C pins (P12[4] and P12[5]) since they are available at the connector. Problem is that compiler does not generate .cyacd file that is needed to flash this firmware (by using embedded I2C bootloader ? )

As far as I understand, I need to use bootloader host, but I cant find file to upload, since it is not generated, and I can't get to SWD ot JTAG pins, only XRES, and I2C.

What I need to do for compiler to generate this .cyacd file and does infineon bootloader is always present so I can re-flash it, like in STM32, or it could be deleted by encoder supplier when they uploaded their own firmware

Please advice how I proceed !

0 Likes
6 Replies
kilohercas
Level 1
Level 1
5 sign-ins First reply posted First question asked

boot.PNG

Does this mean it's single use only, and I will not be able to upload any data , if it was used already ?
(Since SWD pins are not connected at all)

0 Likes

Hello.

The part numbers you show do not exist.
I was able to find CY8C5888FNI-LP210.  Assuming this is the correct part number, yes, there is an I2C Bootloader pre-programmed in the device before it leaves Infineon/Cypress factory.  However, if 5LP has been programmed using SWD, it would most likely be over-written by a non-bootloadable project.  There's one special case where using SWD would download both Bootloader and Bootloadable, but you didn't provide any details on how the 5LP was initially programmed.

I suggest you read the application notes for bootloading in AN73854, and download AN60317 I2C Bootloader (Creator 3.0) zip and pdf from here:
Infineon Technologies  Be sure to download Creator 3.0 version, not Creator 2.2 version.

"Single Application" means only 1 bootloadable can be downloaded into FLASH with the installed bootloader at a time.  A "dual-bootloadable" bootloader is not installed in this device.  And yes, you can download a single bootloadable project as many times as you like.  These downloads can be different bootloadable projects, they don't have to be the same one.

I  doubt the FLASH has been corrupted.  Only if the project is using FLASH write routines, could it get corrupted.

Good luck with your debugging.

0 Likes
lock attach
Attachments are accessible only for community members.

JTAG and SWD pins are not routed at all, only I2C. This means it was factory programmed by using this bootloader.

How can I know that it still exist ? Is it possible to delete it using I2C bootloader  or application that runs afterwards ?

In STM32 bootloaders are in every single format, CAN, I2C,SPI, and they are locked, so not even firmware can delete it. So it looks like this is different, it could be overwritten.

Problem is I don't need I2C bootloader, i just need to flash my file to the device. Or is it mandatory ?
( I am very new to PSoC5LP, I am using STM32 only in my projects where you don't have to deal with any bootloader stuff, it is baked in always and impossible to delete it)

I am using PSoC Creator 4.4. and some of the features are not like in datasheets...

0 Likes

Hi.

I use Creator 4.2, so I can't open your project file.  However, I can read the text files from the project.

It would appear you've used the Bootloader component as part of this test project.  This is not correct.  You need to use the Bootloadable component for a downloadable project.  And, configure it according the AN60317.

The Bootloader is already in the 5LP FLASH (if it hasn't been over-written).  It would take a very specific project to erase the bootloader.  I doubt anyone would write this.  And, the factory could use a "bed-of-nails" to program the 5LP through SWD, so I wouldn't discard that possibility.

Yes, STM32 has a dedicated FLASH area where they keep the bootloader.  Cypress choose to allow the user to customize the bootloader for specific needs (or no bootloader at all) and not waste FLASH space.  Each technique has its pro's and con's.

Since the bootloader in this 5LP is from Creator 3.0, you need to link to that bootloader when building your bootloadable test project.  You don't need to install Creator 3.0.  The correct bootloader files are provided in the AN60317 zip file.

Yes, in this instance, you need the 5LP I2C bootloader to program your bootloadable project.  It's mandatory.

Cypress documentation will appear inconsistent because features were added/deleted during the up-release of components.  You can ignore most of that stuff.  And if you really-really needed to, you can install Creator 3.0.  Just DO NOT install it on the same computer as Creator 4.4.  There's nothing to stop you from doing that, but you'll be in a world of pain when all the libraries get messed up.

The only way to know if the bootloader is still in FLASH is to build a bootloadable project and attempt to download it.

Take the time to read AN60317 and you'll be up and running in no time.

0 Likes

I am still struggling to do so. All documentation looks different when I have on my Creator 4.4, even if I compile and add save device.

0 Likes

Hello.

I'm not sure how to translate "struggle" into a technical description of the problem.  Maybe you can provide some details of what is failing to work.

Which PSoC programmer device are you using, Kitprog, Miniprog, other?

Did you add the required 2 pull-up resistors to the I2C signals?

Did you set the programmer I2C address to 0x04 and data rate to 100kbps as shown in datasheet?

Are the I2C wires longer than 10cm?  Shorter wires are better for signal integrity.

When you build your test project, did you use the bootloadable component?  The bootloader component in NOT the one you want.

Did you point the bootloadable component dependencies to the hex file of the bootloader included in AN60317?

The bootloader has a 2 second window where it looks for bootloading commands.  This happens immediately after power on (or within 2 seconds after 5LP is reset).  So, you have to run the Bootloader Host Tool at just the right time in order to get the I2C commands flowing.  You'll need to experiment with this a bit.  Try starting the Tool first, then power on 5LP and attempt to download right away.  Alternatively, power on 5LP and then start Tool and attempt to download.

I just re-read your original message.  It appears you're not using the correct port pins P1.6 and P1.7 for the I2C interface.  Without access to these 2 pins, the 5LP cannot be downloaded.

Question: how is this product being downloaded during manufacturing?  Someone must know this detail.

If this is a product, talk with the original designer.  That person must have downloaded into this 5LP many-many times during development process.

0 Likes