002-22328 questions/clarification

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

cross mob
ScGr_289066
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

Hi All,

I am using document 002-22328 rev G to program a virgin CYBLE-022001-00 module.  The steps have worked up to the erase entire chip step which is failing at the PollSronStatus() call (Step 3 - erase all flash at the top of page 28).

But what got me wondering is the use of the various symbols to formulate Params values.  Usually fields & symbols like these are manipulated when they are individual fields/bits in registers.  But in this instance and throughout this document many of the fields seem to overlap each other.  For example, the statement at the top of page 28, in the erase all flash routine:

     Params = (SROM_KEY1 << 0) + ((SROM_KEY2+SROM_CMD_ERASE_ALL) << 8);          evaluates to

                    = ( 0xB6 ) + ( ( 0xD3 + 0xA ) << 8

                    = 0xDD00 + 0xB6

                    = 0xDDB6

Is this really what was intended here?  Is seems as if SROM_KEY2 and SROM_CMD_ERASE_ALL are intended to be in different bit field locations from each other rather than being combined as they are.  Are these definitions of these registers in another document that might clarify this?

Here's a trans script of my steps after the chip is "open":

Chip unprotected

writeio(20000100,DDB6): acl1 1, ack2 1

writeio(40100008,20000100): acl1 1, ack2 1

writeio(40100004,8000000A): acl1 1, ack2 1

readio(40100004,A): acl1 1, ack2 1, ack3 1

readio(40100008,F0000012): acl1 1, ack2 1, ack3 1

pollsromstatus()=failed

Can't erase flash

Thanks for your help,

Scott

0 Likes
1 Solution

The issue was due to length of the cable being longer causing delays that affected the SWD timing specifications. Solved by using a shorter cable around an inch long.

Regards,
Dheeraj

View solution in original post

0 Likes
10 Replies