器件型号: AM2634
你(们)好
任何人都能解释为什么我的代码有时会移到 while 循环吗?
它显示 hwip 或 undef 或 svchandler ,每次代码移动到不同的 while 循环。
我想知道为什么会发生这种情况以及如何解决它,是否有任何规定来暂时禁用这些属性。 下面的共享函数将提供有关属性的一些信息。
//<Func 在.S 文件中调用
void _attribute__((interrupt(“undef")“)、section(“.text.hwi")“)) HwiP_RESERVED_HANDLER (void)
{
易失性 uint32_t 环路= 1;
while (loop!=0U)
{
///<等待
}
}
//<Func 在.S 文件中调用
void _attribute__((interrupt(“undef")“)、section(“.text.hwi")“)) HwiP_Undefined_handler (void)
{
易失性 uint32_t 环路= 1;
while (loop!=0U)
{
///<等待
}
}
//<Func 在.S 文件中调用
void __attribute__((interrupt(“SWI")“)、section(“.text.hwi")“)) HwiP_svc_handler (void)
{
易失性 uint32_t 环路= 1;
while (loop!=0U)
{
///<等待
}
}
//<Func 在.S 文件中调用
void _attribute__((interrupt(“abort")“)、section(“.text.hwi")“)) HwiP_prefetch_abort_handler (void)
{
易失性 uint32_t 环路= 1;
while (loop!=0U)
{
///<等待
}
}
//<Func 在.S 文件中调用
void _attribute__((interrupt(“abort")“)、section(“.text.hwi")“)、weak) HwiP_DATA_ABORT_HANDLER_c (void)
{
易失性 uint32_t 环路= 1;
while (loop!=0U)
{
///<等待
}
}