cyble-014008 flash corruption

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

cross mob
maze_1672671
Level 4
Level 4
First like received 25 replies posted 25 sign-ins

Hello all,

my colleagues in the test department found a flash corruption case

Our device is connected to the battery of cars, so it is powered at 12 V; it has also a bootloader

The test is: turn on device, wait for a while, turn off (to 6 V, that is off), wait, repeat.

After a variable amount of time the device stops in the bootloader (it turns on a blue led)

I used psoc programmer to download the two images (corrupted: left)

Immagine.png

As you can see, at address 1FFC0 the content is different (all zero in the corrupted case, erased?)

From the map file I got:

.cyloadermeta  0xf0000000       0x40 .\CortexM0\ARM_GCC_541\Release\cybootloader.o

                0xf0000000                cy_meta_loader

                0x0001ffc0                cyloadablemeta_start = cy_project_type_app_for_stack_and_copier?((LENGTH (rom) - CY_FLASH_ROW_SIZE) - CY_METADATA_SIZE):((LENGTH (rom) - (CY_FLASH_ROW_SIZE * (CY_APPL_NUM - 0x1))) - CY_METADATA_SIZE)

.cyloadablemeta

                0x0001ffc0       0x40

*(.cyloadablemeta)

.cyloadablemeta

                0x0001ffc0       0x40 .\CortexM0\ARM_GCC_541\Release\cymetadata.o

                0x0001ffc0                cy_meta_loadable

Can you tell me why this can happen? That is, when bootloader/bootloadable change that flash row?

Best regards

Massimo

0 Likes
1 Solution

I assume that you are not bootloading a new application during the above-mentioned test procedure.

If yes, please use the latest Bootloader and Bootloadable_v1.60 in your application.

View solution in original post

0 Likes
11 Replies
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

Please confirm whether the bootloadable application is either programmed or bootloaded in the first case (err.txt).

PSoC Programmer 3.28 supports 'Read to Hex' file feature. Please share the comparison result among the original (programmed) and flash read hex files.

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

Here attached the two hex files (I changed to uppercase both files)

Bootloader and bootloadable are both present in the hex files

0 Likes

I assume that you are not bootloading a new application during the above-mentioned test procedure.

If yes, please use the latest Bootloader and Bootloadable_v1.60 in your application.

0 Likes

They are both 1.50

My colleagues started testing after the devices were installed

If I change to 1.60, what will happen to devices already installed? Will they update also the bootloader?

Can you devise other ways to corrupt that row? That is, does exist cyble_something() that writes info on that row?

0 Likes
0 Likes

Excuse me, I don't understand your answer

When we update devices in the field, we use the .cyacd file. We cannot use other tools because the device is hidden inside a car and it will be very expensive to uninstall and then reinstall.

Are you telling that the upgrade process via .cyacd  will update also the bootloader?

0 Likes

Bootloading cycad file updates only the application code and data.

For testing please re-program the test device with updated bootloader and bootloadable projects.

0 Likes

After a lot of tests, the guys told me that, with the new versions, the problem disappeared

Can you explain what happens with the old versions?

What can we do with devices already installed? Can we modify only the application to avoid the problem?

0 Likes

Bootloader v1.50 or earlier writes to metadata each time during startup. A flash write requires stable power for device Vdd and Vss pins. It can take as much as 20 milliseconds to write to flash. During this time, the device should not be reset, or flash operations will be interrupted and cannot be relied on to have completed. Bootloader v1.60 has been updated to avoid redundant updates if the same data is already present in flash. This modification is part of bootloader component which executes first after reset and it needs to be updated to fix this issue.

0 Likes

thank you for the explanation

we would like to update our fw so that new devices will have 1.6 in bootloader and bootloadable, but we need to keep the same application also in old devices

can we use bootloadable 1.6 and bootloader 1.5?

0 Likes

Yes, you can. The version changes are implemented in Bootloader source files.

0 Likes