- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- The bootloader also needs to be updated over the normal programming cycle.
- PSoC Programmer supports Utitlies > Erase Block option to erase a specific flash row number. Please install the latest PSoC Programmer.https://www.cypress.com/products/psoc-programming-solutions
- You can also use CySysFlashWriteRow API to erase and write to a specific flash row.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bootloading cycad file updates only the application code and data.
For testing please re-program the test device with updated bootloader and bootloadable projects.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you can. The version changes are implemented in Bootloader source files.