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

PSoC™ 4 Forum Discussions

msnaeem89
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hello
I am using CY8C4245AXI-483. I want to test SRAM using Safety Library AN89056 .
It is working fine but I have a confusion. As SRAM base address is 0x20000000. And CY8C4245AXI-483 has 4 kB SRAM.
While debugging the microcontroller, It tests only up to 0x20000B00. So, It is only testing up to 2816 bytes. and theoretically, it should test SRAM till 4096 Bytes. Kindly guide me where I am making mistakes or suggest me the correct parameters to select to Test full SRAM.

0 Likes
1 Solution
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @msnaeem89 

 

The reserved buffer is tested before the actual SRAM and Stack. In the assembly code SelfTestSRAM_March_GCC.s, please take a look at line#765. This takes care of testing this reserved block. 

Hari_0-1644580450209.png

 

 

Only after the reserved block is tested, the SRAM from starting till the end is tested. 

 

Please try debugging at this region and checking the values. 

 

Best regards, 
Hari

View solution in original post

4 Replies
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @msnaeem89 

 

Can you please let us know the way you are testing the application?

Note that the start and end RAM addresses are defined in the SelfTestSRAM_March_<compiler>.s file. You can check the MARCH_SRAM_BASE and MARCH_BUFF_ADDR_START macros for the addresses that are tested by the application. 

 

Best regards, 
Hari

0 Likes
msnaeem89
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Thanks, Hari for your reply.
Actually, 1k bytes is the Stack size so that's why it is not testing from 3072 to 4096 which I realized later.
 but still, It doesn't test 1 block of memory from 2816 to 3072.
if I decrease the block size it tests further but still, it doesn't test for that size.
e.g it goes till 3008 if the block size is 64 and doesn't test the last 64 bytes.
Through debugging, I just check the current address of R1 and R0 when the program is at the 859th line(Pass complete Status). I have attached my function which calls SelfTests_SRAM_March.



0 Likes
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @msnaeem89 

 

The reserved buffer is tested before the actual SRAM and Stack. In the assembly code SelfTestSRAM_March_GCC.s, please take a look at line#765. This takes care of testing this reserved block. 

Hari_0-1644580450209.png

 

 

Only after the reserved block is tested, the SRAM from starting till the end is tested. 

 

Please try debugging at this region and checking the values. 

 

Best regards, 
Hari

msnaeem89
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Thanks, Hari I have understood now

0 Likes