lib_tsn firmware upgrades

Technical discussions around xCORE processors (e.g. xcore-200 & xcore.ai).
knaesevic83
New User
Posts: 2
Joined: Tue Feb 27, 2024 1:22 pm

lib_tsn firmware upgrades

Post by knaesevic83 »

Hi everyone,
I was trying to do firmware upgrades via avb using lib_tsn and Hive using a xcore 200 explorer board. In a newer version of our software it is not working anymore as fl_writeImagePage sporadically fails.
Unfortunately I did not find anything in the documentation about return values of that function (I got -1,0 and 1). I already checked image sizes, start address etc. but couldn't find any error,
also preparing the flash with fl_startImageAdd/fl_startImageReplace still works as expected.
Has anyone experienced the same issues or can you suggest how I can possibly debug?

Many thanks in advance for your help!
markp
Verified
Member
Posts: 11
Joined: Thu Jan 10, 2019 6:07 pm

Post by markp »

The specific return code values for fl_writeImagePage() are:

-1 : page to be written will exceed allocated flash space
0 : success
1 : readback of page bytes do not match requested page write bytes

I would have expected the value "-1" to be returned repeatedly (not sporadically) if the page to write would write above the allocated space.
fabra
Active Member
Posts: 39
Joined: Sat May 09, 2020 4:20 pm

Post by fabra »

We got it to work be reducing the SPI clock speed.