burst access across SRAM upper / lower boundary

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

burst access across SRAM upper / lower boundary

跳至解决方案
1,290 次查看
mike1974
Contributor III

The manual for K22 states:

 

Burst-access cannot occur across the 0x2000_0000 boundary

that separates the two SRAM arrays. The two arrays should be

treated as separate memory ranges for burst accesses.

 

Can someone give me an example of when "burst access" might occur in an application? 

 

I want to use the SRAM as one block (disable the two seperate blocks in linker map, and just use one).  Has anyone actually encountered a problem in real life doing this?  And not just in theory.

标签 (1)
1 解答
1,007 次查看
ndavies
Contributor V

I ran into a problem with this. We had allocated all the RAM as a single block. The boundary between the upper and lower SRAM ended up in the middle of our heap. We had allocated an array buffer across the boundary. The buffer was used to collect data to be parsed. While parsing the data, we randomly ended up with a misaligned WORD or DWORD read across the boundary. This lead to a hard fault. It was very intermittent and very difficult to find.

Since the boundary was in the heap, Our solution was: on startup we allocated a small array over the boundary and orphaned it. This guarantied no active data item straddled the boundary.

Norm

在原帖中查看解决方案

1 回复
1,008 次查看
ndavies
Contributor V

I ran into a problem with this. We had allocated all the RAM as a single block. The boundary between the upper and lower SRAM ended up in the middle of our heap. We had allocated an array buffer across the boundary. The buffer was used to collect data to be parsed. While parsing the data, we randomly ended up with a misaligned WORD or DWORD read across the boundary. This lead to a hard fault. It was very intermittent and very difficult to find.

Since the boundary was in the heap, Our solution was: on startup we allocated a small array over the boundary and orphaned it. This guarantied no active data item straddled the boundary.

Norm