Subject: K60 ram bitfield usage

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

Subject: K60 ram bitfield usage

1,061 次查看
sandrobilardi
Contributor I

Description:

Is there a sample code for better understandig usage of bitfield area in K60 (Kinetis) and linker settings if necessary?

I'm using gcc compiler and linker.

Regards,

Sandro

标签 (1)
0 项奖励
回复
2 回复数

835 次查看
egoodii
Senior Contributor III

Unfortunately, I know of no tools that will 'help' you use the bit-access functions ('bit banding') available to the upper-half of SRAM in Kinetis K.  I have one application with a LOT of boolean arrays, and I was really hoping the tools would allow me to declare them so, and the compiler and linker would recognize the special addressing requirements, but no dice.  You have to 'make your own RAM space' and force allocation within it so that the compiler can understand the access process.  I did find one VERY nice usage for bit-banding as my 'local' image of a monochrome bitmap display, and I could use the bit-banding access to directly write individual pixels for line and bitblt functions, in an array padded with SPI-overhead bytes for DMA.  Look at my post in here:

https://community.freescale.com/thread/309727

835 次查看
sandrobilardi
Contributor I

Thanks for answer. I have seen at your link and I understood the principle. Not for quick use.

Regards,

Sandro

0 项奖励
回复