相关疑难解决方法(0)

在STM32上生成C中的纳秒延迟

我正在使用STM32F2控制器,我通过8位并行接口与ST7036 LCD显示器连接.

数据表说地址保持和建立时间之间应该有20纳秒的延迟.

如何在C中产生20纳秒的延迟?

c lcd stm32

10
推荐指数
2
解决办法
8984
查看次数

测量皮质m7上的时钟周期计数

我一直在测量皮质m4上的时钟周期计数,现在想在皮层m7上做.我使用的主板是STM32F746ZG.

对于m4,一切顺利:

volatile unsigned int *DWT_CYCCNT;
volatile unsigned int *DWT_CONTROL;
volatile unsigned int *SCB_DEMCR;

void reset_cnt(){
    DWT_CYCCNT   = (volatile unsigned int *)0xE0001004; //address of the register
    DWT_CONTROL  = (volatile unsigned int *)0xE0001000; //address of the register
    SCB_DEMCR    = (volatile unsigned int *)0xE000EDFC; //address of the register
    *SCB_DEMCR   = *SCB_DEMCR | 0x01000000;
    *DWT_CYCCNT  = 0; // reset the counter
    *DWT_CONTROL = 0; 
}

void start_cnt(){
    *DWT_CONTROL = *DWT_CONTROL | 0x00000001 ; // enable the counter
}

void stop_cnt(){
     *DWT_CONTROL = *DWT_CONTROL …
Run Code Online (Sandbox Code Playgroud)

c embedded arm stm32f7

8
推荐指数
1
解决办法
1751
查看次数

标签 统计

c ×2

arm ×1

embedded ×1

lcd ×1

stm32 ×1

stm32f7 ×1