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

TRAVEO™ T2G Forum Discussions

JackHsu_1153471
Level 3
25 replies posted 50 sign-ins First like received
Level 3

Hi

Good day.

 

I have a questions about single/dual bank selection on Traveo II.

We are based on programming guide to implement the programming algo.

it doesn't mention about bank selection, and it is mapped the single bank.

My question is..

if customer need to load the image file to dual bank mapping, do we need to bank selection option to set FLASHC_FLASH_CTL? or we don't need to do anything, and the device will do the bank setting after it is booted.

There is customer's requirement. You can see the file B setting. and How do we do? 

ddddd.png

Thank you.

Jack

 

 

0 Likes
1 Solution
Ashish
Moderator
Moderator 25 likes received 50 solutions authored 100 replies posted
Moderator

Hi Jack, 

Document 002-22035 is programming specification document, so I understand you're developing a programmer. If that's the case- kindly let your customer know that DBM is implemented as part of application code itself and not in programmer. From programmer point of view- there's no difference- if you have two sets of files you should be able to flash both in single go (just provide correct addresses as in previous reply). Customer should implement a DBM code which will manage the transition of one bank to other etc. If customer want Dual-bank feature to implement RWW (read-while-write i.e. executing from one bank, while upgrading the firmware in other bank) they need to have a bootloader which will be executed by DBM based on upgrade request. Kindly ask them to refer the AN229058 and AN220242 for details and references. 

Ashish

View solution in original post

8 Replies
Ashish
Moderator
Moderator 25 likes received 50 solutions authored 100 replies posted
Moderator

Hi Jack,

The device after reset always boots in Single bank mode. User needs to set these bit-fields in the FLASHC_FLASH_CTL registers for changing the configurations to work in dual bank mode-

Ashish_0-1657039161730.png

So, in your application you should have a DBM (dual bank manager) code that sets the bank to dual bank mode and depending on your given conditions maps to appropriate bank. How you write a DBM code is up-to you, but it should run just after boot before your start with your application (so that appropriate application runs). Kindly note that for program flash (CodeFlash)- the MAIN_BANK_MODE/MAIN_MAP is applied where as for data flash (WorkFlash) - the WORK_BANK_MODE/WORK_MAP is applied.

 

Thanks,

Ashish

 

0 Likes
JackHsu_1153471
Level 3
25 replies posted 50 sign-ins First like received
Level 3

Hi Ashish,

 

Thanks for your reply.

Understand, it is set on DBM code.

It means customer needs to merge their dual bank image to one image, and chip is based on the DBM code to set up the dual bank mode.

It means customer should merge the dual bank image to one image for programming because programmer supports whole main flash(e.g. CY2BL5CAAQ0AZEGS is 0x410000), and then chip will remap the image to dual bank after it is booted. right?

Thank you.

Jack

 

 

0 Likes
Ashish
Moderator
Moderator 25 likes received 50 solutions authored 100 replies posted
Moderator

Hi Jack,

May I know what exactly is the use case? In case you're developing some FOTA application- can you please refer this AppNote- it may be helpful:

https://www.infineon.com/dgdl/Infineon-AN229058_Secured_firmware_over-the-air_%28FOTA%29_update_in_T...

Regarding your approach for merging image- you can try to flash it in a single go and the chip will remap to appropriate bank based on DBM code. I don't see why there should be any issue- but can you please test this and let us know if it's successful? Also kindly note that Flash is shared across all the processor cores- so changing bank would remap the memory which affects all cores- so if you are programming in a single-go for both bank A and B, make sure that code for all the cores (CM0+, CM4/CM7_x) are programmed in both banks. For details on Flash programming and dual banks- kindly refer this AppNote:

https://www.infineon.com/dgdl/Infineon-AN220242_Flash_Accessing_Procedure_for_Traveo_II_Family-Appli...

 

Regards,

Ashish

0 Likes
JackHsu_1153471
Level 3
25 replies posted 50 sign-ins First like received
Level 3

Hi Ashish,

 

Thanks for your great support.

 

We are third party programmer manufacturer.

We have done the algo to program TraveoII series.

Now, Our customer is asking whether supports dual bank mode programming. That is why i'm asking on community.

According to the information you provided, there is customer's image setting in dual mode. Customer has two images, one is HSM(File1) and another is FBL+MainSW(File2). MPN is CYT2BL3CAAQ0AZEGS.

File 1 : mapping at address 0x10000000 ~ 0x10027FFF

File 2 : mapping at address 0x10028000~0x101DF5FF

File 2 : mapping at address 0x12028000~0x121DF5FF

If the file merge to one image, is it correct to be defined? 

File 1 : mapping at address 0x10000000 ~ 0x10027FFF

File 2 : mapping at address 0x10028000~0x101DF5FF and 0x10220000~103D75FF

 

If incorrect, may I know how to do about dual bank to single bank?

Thank you.

Jack

0 Likes
Ashish
Moderator
Moderator 25 likes received 50 solutions authored 100 replies posted
Moderator

Hi Jack,

If you question is if Traveo-II dual bank- then yes it does. But as I told, for implementation- you need to have a DBM code and the program should go to DBM before it jumps to main application code. The program after reset will always work in single-bank mode. The DBM should take care of activating dual-bank and which bank should be active based on certain conditions, and fall back (if needed) to other bank in case one is corrupt. So implementation-wise it may differ case-to-case. If your customer is developing FOTA based application then you can refer to this Appnote- AN229058

As general guidelines of Flash programming and dual bank approach- you can refer this Appnote -AN220242 (section 4 describes dual bank). 

CYT2BLx has 4MB of Code-Flash, so for dual bank, the mapping is as shown in below snapshot. You cannot execute simultaneously from both banks, so if a set of code is in bank-0, and other is in bank-1 -you will be executing application from either bank 0 or bank 1 and not both. (So if you merge the file, File 2 is okay as per initial config but there is no corresponding part for File 1 in your setup- you can have that also - as shown below). 

Bank0:

File 1 : mapping at address 0x10000000 ~ 0x10027FFF

File 2 : mapping at address 0x10028000~0x101DF5FF

Bank1:

File 1 : mapping at address 0x12000000 ~ 0x12027FFF

File 2 : mapping at address 0x12028000~0x121DF5FF

Ashish_0-1657698935310.png

Kindly also refer Architecture TRM -section 8.2.4.1 Dual Bank Mode and Remap Functionality.

Thanks,

Ashish

0 Likes
JackHsu_1153471
Level 3
25 replies posted 50 sign-ins First like received
Level 3

Hi Ashish,

 

Thanks for your reply.

I'm refer to the document #002-22035 Rev.*C. The document doesn't mention about dual bank programming, and it should be same as single bank programming. Now, customer need the dual bank requirement for implement. We would like to know a way that merger dual bank image to one image for programming?

If not, We might create a specific algo to implement dual bank programming.

JackHsu_1153471_0-1657701034542.png

Thanks.

Jack

 

0 Likes
Ashish
Moderator
Moderator 25 likes received 50 solutions authored 100 replies posted
Moderator

Hi Jack, 

Document 002-22035 is programming specification document, so I understand you're developing a programmer. If that's the case- kindly let your customer know that DBM is implemented as part of application code itself and not in programmer. From programmer point of view- there's no difference- if you have two sets of files you should be able to flash both in single go (just provide correct addresses as in previous reply). Customer should implement a DBM code which will manage the transition of one bank to other etc. If customer want Dual-bank feature to implement RWW (read-while-write i.e. executing from one bank, while upgrading the firmware in other bank) they need to have a bootloader which will be executed by DBM based on upgrade request. Kindly ask them to refer the AN229058 and AN220242 for details and references. 

Ashish

JackHsu_1153471
Level 3
25 replies posted 50 sign-ins First like received
Level 3

Hi Ashish,

 

Thanks for great support.

I will inform the information that refer to the AN229058 and AN220242 for details and references. 

Thank you.

Jack

0 Likes