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
User18124
Level 1
Level 1
Hi Everyone,
During the development of the flash programming tool for the TC397 ED Emulation device, by mistake I've got to the locked state of the microcontroller DAP interface (probably because of the wrong BMHDs).

/ESR0 pin state is constantly low. The DAS Basic client shows "DAS Error: DEVICE_LOCKED," so OSTATE.IF_LCK = 1. I am not able to use Memtool and bootloader.

Is it possible to use Emulation device DAP (DAPE) to load the correct flash image?

Best regards, Lukas Otava
0 Likes
6 Replies
RValascho
Employee
Employee
5 sign-ins First like received 5 questions asked
Invalid BMHDs will not lock the device. Parts are shipped with no BMH present and still can connect to a debugger. It is more likely that other UCB records (ie HSM or Debug) are corrupted. Did your program target these UCB records (0xAF000030 or 0xAF030000 - 0xAF030040 range)? Check the hex to see. Unfortunately, changes to these fields could permanently lock the device.
0 Likes
User18124
Level 1
Level 1
RValascho, thank you for your response. There is a list of operations executed during the last experiment:

#001 erasing 0xAF400000 - 0xAF4007FF
#002 programming 0xAF400000 - 0xAF4007FF
#003 erasing 0xAF401000 - 0xAF4017FF
#004 programming 0xAF401000 - 0xAF4017FF
#005 erasing 0xA0000000 - 0xA0FFFFFF

I have analyzed my functions for programming and erasing and I finally found out the possible cause of problems. My programming function programmed only 1/4 of erased pages - therefore some parts of BMHDs are only erased but not programmed.

Can SSW handle this situation?

Lukas Otava
0 Likes
cwunder
Employee
Employee
10 likes given 100 solutions authored 5 likes given
In your analysis of only programming 1/4 of the erased pages, what does that mean? Every UCB requires a valid CONFIRMATION word to be written at its expected location within every UCB. The CONFIRMATION word is near the end of the UCB sector (0x01F0 offset from the beginning of the sector).

The manual states "The BMHD installation is dependent on the confirmation states of UCB_BMHDx_ORIG and UCB_BMHDx_COPY. If the confirmation code of both ORIG and COPY is ERRORED, SSW does not evaluate the UCB" You need at least one of BMI UCBs to be in the UNLOCKED or CONFIRMED state otherwise the SSW will exit with an error (see section 6.5.4.3.1 UCB Confirmation of the users manual)

Also note there is an errata which you should review to ensure that you did not hit this:
BROM_TC.016 Uncorrectable ECC error in Boot Mode Headers.
0 Likes
User18124
Level 1
Level 1
cwunder: By mistake, I considered the write page size for UCBs to be 32 bytes instead of 8 bytes (which is correct).
0 Likes
User19266
Level 2
Level 2
Did you solve this issue?. i have the same.
0 Likes
User18124
Level 1
Level 1
Hello, I had to buy a new board.

But a solution "to be on safe side" seems to be not writing all UCBs, but only the first set.
0 Likes