CYT2B9 sFlash Row 13 Access Restrictions

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

cross mob
lock attach
Attachments are accessible only for community members.
Kevin92
Level 1
Level 1
First like given 5 sign-ins First reply posted

Hello,

I'm trying to write to the sFlash Row13 to write the Access Restrictions. I managed to write to the sFlash once. I tried to write default value 0x80 00 for the Access Restrictions settings, just to confirm writing to sFlash is working in general.

My next step was to write Access Restrictions to disable M0-AP and M4-AP, but the WriteRow system call always fails with status STATUS_INVALID_ACCESS_RESTRICTION. I don't understand why, because I'm trying to write closer restrictions not wider?!

One strange thing I observed during my first successful write is that Byte 4 to 7 changed from 0 to (0x01 0xFE 0x03 0x08), see attached screenshot. Where does these bytes stand for? I can't find anything in the TRM for these addresses.

The general life-cycle stage is still normal.

Thanks for your help!

Kevin

0 Likes
1 Solution
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi @Kevin92 

Each SFlash row consists of 512 bytes and WriteRow system call updates the complete 512 bytes. When you need to update only specific bytes/bits of the SFlash, the current value should be read from the memory and only those specific bytes/bits should be modified and passed as parameter for WriteRow system call.

Regards.

View solution in original post

2 Replies
Kevin92
Level 1
Level 1
First like given 5 sign-ins First reply posted

I've tested the WriteRow r13 with a new MCU. This time I wrote directly the lock of the JTAG (0x95) and it works! I increased the Data Buffer for the write command to 8 Byte and set all other bytes to 0. It seems that WriteRow write always 8 Bytes, is this correct?

0 Likes
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi @Kevin92 

Each SFlash row consists of 512 bytes and WriteRow system call updates the complete 512 bytes. When you need to update only specific bytes/bits of the SFlash, the current value should be read from the memory and only those specific bytes/bits should be modified and passed as parameter for WriteRow system call.

Regards.