问题标签 [bit-banding]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
linker - ARM RealView linker: locating in any of several regions
Is there a way of allowing the ARM RealView/Keil linker to select from more than one but not all regions?
I can use the .ANY
specifier to allow the linker free reign, and I can use a *(section_name)
specifier to locate specific objects to a single region, but I would like to be able to have the linker select from several suitable regions.
To make it clear why this is desirable, I am using an STM32F4xx microcontroller with three distinct but contiguous SRAM regions on separate busses, and a further core-coupled memory region which is not bit-bandable or accessible by DMA. I want to use the smaller SRAM region for DMA to avoid bus contention and improve performance and deterministic behaviour. This region is inconveniently located between two larger regions and I want to be able to use either of the larger regions for bit banding while allowing the CCM memory be used freely for any purpose other than DMA or bit-banding. The regions are currently specified as follows:
Adding *(bitbandable_ram)
to SRAM1 and SRAM3 is rejected by the linker with:
Similarly creating an overlapping region does not work:
reporting:
Currently my less-than-ideal solutions are:
- to nominate only one region for bit-banding,
to make all the contiguous SRAM a single region (allowing DMA operations may occur in any memory making it less deterministic) thus:
/li>- Removing the
.ANY
selector from the CCM region requiring object to be explicitly located there using thecore_coupled_ram
named section.
cortex-m3 - 如何计算Cortex-M3中地址0x4000 0100的位带别名堡垒位17?
如何计算 Cortex-M3 中地址 0x4000 0100 的位带别名堡垒位 17?这个对吗?
c - 按位与运算程序执行问题
下面是一个程序,我试图在其中重置十六进制数的特定位。位位置、要重置的位数和十六进制值都是用户输入。
头文件
C 文件
主文件
我正在使用 Visual Studio 编译并运行执行上述代码。
问题出在C文件中,就RegB = RegA & ~L;
行了。AND 操作似乎没有发生,因为我得到 0 作为RegB
值。
程序输入:
输入要重置的十六进制值:0100 1111
输入的十六进制值为:0100 1111
需要重置多少位小数(0-31):1
输入需要重置的小数位:1
clock - I2C 位与时钟拉伸的碰撞不起作用
我尝试在 PIC 18F4520 中实现 I2C 位碰撞以与 OLED 进行通信。它在没有“时钟拉伸”的情况下工作正常,但如果我把“时钟拉伸”放在它不起作用。而且我还尝试在 ACK 脉冲之前和之后放置“时钟拉伸”块,两者都不起作用。我的时钟拉伸有什么问题?
cortex-m - 关于 Cortex-M3 bit-banding 功能的一些问题
(我是 ARM 微控制器的新手。如果这是一个幼稚的问题,请原谅我。)
ARM-M3 处理器提供独特的位带功能,可将 SRAM 和外围区域的前 1M 地址范围中的位分别映射到另一个别名地址范围中的 32 位字。
我的问题是:
为什么只映射前1M?第一个 1M 系列有什么特别之处?
映射的 32M 别名范围仍然在 SRAM/Peripheral 范围内,所以它们不能用于其他目的,对吧?
如果我想在位带区域中设置一个位,我应该写
0xFFFFFFFF
,0x000000FF
还是只写到0x1
映射的别名字?似乎它们都可以工作,但我不确定哪一个是安全/正确的。
c - TI MSP432P401 板的位带别名偏移地址
请任何人解释一下,在下面的公式中计算TI MSP432P401R板的位带别名偏移地址,为什么我们应该添加(addr & 0xF0000000) + BB_OFFSET
这个值((addr & 0xFFFFF) << 5)
?
如果MSP432addr
中的变量具有. 代表着:word == uint32_t
(addr & 0xF0000000) + BB_OFFSET = 0x42000000
- 进而:
(bit << 2) = 0x00000002
- 别名将很简单:
0x42000000 + 0x00000002 = 0x42000002
?所以,我提出了我的问题:为什么我们还需要添加((addr & 0xFFFFF) << 5)
到(addr & 0xF0000000) + BB_OFFSET
?
我的计算错了吗?
提前谢谢了,