Error happen when I reading data continuously from fixed address of FRAM

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

cross mob
Nelson
Level 2
Level 2
10 sign-ins 5 sign-ins First solution authored
FRAM.png
  • The data I saved in FRAM is 0-255. An error occurred when I read data from FRAM using DMA and SPI, as shown in the figure above. But this error happens when I read and write thousands of times, sometimes tens of thousands of times. I tried to change the interval between readings, but it didn't work. I hope I can get your help. Thank you.

 

0 Likes
1 Solution

Hi,@ritwicksharma.

>GND has been connected together.

>I later used SPI simulation to read FRAM data and did not find such a problem. I have tried SPI1 and SPI3 on STM32L476RG and similar problems will occur. SPI accepts data. I have tried DMA and query methods, both of which have errors, but the phenomenon is different. The DMA mode is shown in Figure 1 and the query mode is shown in Figure 2.

>In both cases the data sent from FRAM is correct. This shows that it is not the FRAM problem, but the STM32L476RG hardware SPI problem.

Thanks again for your reply.

1151575730_0-1630371653381.png

                                                                                    Figure 1

1151575730_1-1630371668765.png

Figure 2

PREVIEW
 

View solution in original post

0 Likes
4 Replies
Ritwick_S
Moderator
Moderator
Moderator
100 solutions authored 25 likes received 250 sign-ins

Hi @Nelson ,

 

Could you please tell us the part number of the FRAM you are using?

 

Thanks,

Ritwick

0 Likes

Thank you for your reply. The part number of the FRAM I use is CY15B108QI. I captured the data through the logic analyzer and found that there was no error in the data sent by FRAM. Now I suspect that there may be a problem with SPI. The MCU I use is STM32L476RG.

0 Likes
Ritwick_S
Moderator
Moderator
Moderator
100 solutions authored 25 likes received 250 sign-ins

Hi @Nelson ,

 

 

>Could you please check that the GND of both boards is connected?
>Could you also try with a different set of pins for SPI on STM32L476RG?

 

Thanks,

Ritwick

0 Likes

Hi,@ritwicksharma.

>GND has been connected together.

>I later used SPI simulation to read FRAM data and did not find such a problem. I have tried SPI1 and SPI3 on STM32L476RG and similar problems will occur. SPI accepts data. I have tried DMA and query methods, both of which have errors, but the phenomenon is different. The DMA mode is shown in Figure 1 and the query mode is shown in Figure 2.

>In both cases the data sent from FRAM is correct. This shows that it is not the FRAM problem, but the STM32L476RG hardware SPI problem.

Thanks again for your reply.

1151575730_0-1630371653381.png

                                                                                    Figure 1

1151575730_1-1630371668765.png

Figure 2

PREVIEW
 
0 Likes