







// 方法1:明确的延时
#define DELAY_US(us) { \
volatile uint32_t count = (us) * (CPU_FREQ_MHZ); \
while(count--); \
}
AXI_REG_WRITE(RST, 1);
DELAY_US(1); // 1微秒复位脉冲
AXI_REG_WRITE(RST, 0);
DELAY_US(1);
AXI_REG_WRITE(RST, 1);
// 方法2:防止优化的空循环
void delay_us(uint32_t us) {
volatile uint32_t count = us * 100; // 粗略延时
while(count--);
}
// 方法3:使用DSB指令确保写完成
AXI_REG_WRITE(RST, 1);
__DSB(); // Data Synchronization Barrier
AXI_REG_WRITE(RST, 0);
__DSB();
AXI_REG_WRITE(RST, 1);






