cancel
Showing results for 
Search instead for 
Did you mean: 

RSIG Read Electronic Signature (90h)

kwun-keat
Associate II
Posted on September 11, 2006 at 11:24

RSIG Read Electronic Signature (90h)

3 REPLIES 3
kwun-keat
Associate II
Posted on May 17, 2011 at 09:31

Has anyone been able to read the Electronics Signature of the STR91x? I'm using the Keil MCBSTR9 ver2 Eval Board.

The expected values are in the STR9 Flash Programming Manual Rev1 Section 1.11.2 (p.13). Looking at the Memory Window in Realview doesn't show the expected values except for Manufacturer code.

I get the following:

Manafacturer Code 0x0020

Device Code 0x0000

Die Revision Code 0x0000

Protection Level 2 Register 0x2000

Protection Level 1 Register 0x0041

Flash Configuration Register 0x5700

Can someone please help?

Thanks!

Here is my code:

#define FMI_BANK_1 ((*(vu32*)0x54000010) << 2)

void Fmi_Rsig_Cmd_Handler()

{

u16 fmi_rsig16 = 0;

u8 fmi_rsig[12] = {0,0,0,0,0,0,0,0,0,0,0,0};

int get_fmi_rsig_cnt= 0;

int fmi_rsig_cnt = 0;

//Write a read RSIG command to any word address in Bank1

*(vu16 *)(FMI_BANK_1) = 0x90;

//Read any RSIG register from any addres in Bank1

//using the low byte of the address to select the register.

for (get_fmi_rsig_cnt = 0; get_fmi_rsig_cnt < 6; get_fmi_rsig_cnt++)

{

fmi_rsig16 = (*(vu32*)(FMI_BANK_1 + get_fmi_rsig_cnt));

fmi_rsig[fmi_rsig_cnt++] = fmi_rsig16 & 0x00FF;

fmi_rsig[fmi_rsig_cnt++] = (fmi_rsig16 & 0xFF00) >> 8;

}

//Write a read array command to return to Read Array mode

*(vu16 *)FMI_BANK_1 = 0xFF;

//Return value to host PC

Load_TX_Buf(fmi_rsig);

}

kwun-keat
Associate II
Posted on May 17, 2011 at 09:31

Is the RSIG working for anyone?

Any help, however little, would be appreciated.

Thanks!

kais
Associate II
Posted on May 17, 2011 at 09:31

Hi kk,

When writing a command to the Flash memory, the command or Data byte must be placed on D[7:0] of the FMI memory bus. This requires the bank or sector address to be at a word boundary (word address), except when programming a halfword. (Refer to Flash prog user manual ).

The following code can be useful for you to read RSIG registers(pls see fmi_rsig table).

u16 fmi_rsig[6] = {0,0,0,0,0,0};

u16 fmi_rsig16 = 0;

u8 i;

int main()

{

#ifdef DEBUG

debug();

#endif

//Write a read RSIG command to any word address in Bank1

*(vu16 *)(FMI_BANK_1) = 0x90;

//Read any RSIG register from any addres in Bank1

for(i = 0; i < 6; i++)

fmi_rsig[i] = (*(vu32*)(FMI_BANK_1 + (i<

//Write a read array command to return to Read Array mode

*(vu16 *)FMI_BANK_1 = 0xFF;

}

Regards

Eris.