完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好!
我在SPC5工作室中仅使用SPC560Bxx平台组件制作了新项目。 当我添加OSAL组件时,Interrupt确实运行良好。 目前,我试图在没有OSAL和任何HAL组件的情况下启用中断。但它不起作用。 如何在没有OSAL和任何HAL组件的情况下启用中断?注意:ivor.s复制我的项目文件夹。 我的代码如下。 [Vector.c] const dword u32_IsrVectorTable_SW_Table [] = { (dword)& Cpu_Interrupt,(dword)& Cpu_Interrupt,/ * ISRs 000 - 001 * / ... (dword)& STM_Ch0_ISR,(dword)& Cpu_Interrupt,/ * ISRs 030 - 031 * / ... (dword)& ADC_Ch0_ISR,(dword)& Cpu_Interrupt,/ * ISRs 062 - 063 * / ... } [main.c中] void INTC_Init(void) { INTC.MCR.R = 0; INTC.CPR.R = 0; INTC.IACKR.R =(dword)& u32_IsrVectorTable_SW_Table [0];返回; } int main(void) {... INTC_Init(); asm('wrteei 1'); 对于(;;) { .... } return(ERR_OK); } 谢谢! 以上来自于谷歌翻译 以下为原文 Hello! I made new project only using SPC560Bxx Platform Component in SPC5 studio. When I add OSAL component, Interrupt does work well. At present, I am trying to enable interrupt without OSAL and any HAL component. But it doesn't work. How do I enable interrupt without the OSAL and any HAL component?Note : ivor.s copy my project folder. My code is as below. [Vector.c] const dword u32_IsrVectorTable_SW_Table[] = { ( dword )&Cpu_Interrupt, ( dword )&Cpu_Interrupt, /* ISRs 000 - 001 */ ... ( dword )&STM_Ch0_ISR, ( dword )&Cpu_Interrupt, /* ISRs 030 - 031 */ ... ( dword )&ADC_Ch0_ISR, ( dword )&Cpu_Interrupt, /* ISRs 062 - 063 */ ... } [main.c] void INTC_Init ( void ) { INTC.MCR.R = 0; INTC.CPR.R = 0; INTC.IACKR.R = ( dword )&u32_IsrVectorTable_SW_Table[ 0 ]; return; }int main ( void ) { ... INTC_Init(); asm('wrteei 1'); for(;;) { .... } return ( ERR_OK ); } Thank you! |
|
相关推荐
3个回答
|
|
你好 ,
我没有看到你的项目的ivor.s 无论如何,你可以使用我们的ivor.s之类的灵感 你必须创建一种prolog来创建堆栈框架(保存上下文) 和一个epilog(恢复上下文) 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello , I do not see your ivor.s of your project Anyway , you can use our ivor.s like inspiration you have to create a sort of prolog to create the stack frame (Save the context) and an epilog (Restore the context) Best regards Erwan |
|
|
|
你好!
谢谢您的回复。 我附上了ivor.s文件和我的矢量文件 ivor.s文件是SPC5工作室的副本。 你能否提供一些关于中断启用的示例代码,它不使用我的向量表中的OSAL和HAL组件? 以上来自于谷歌翻译 以下为原文 Hello! Thank you for your reply. I attached ivor.s file and my vector file ivor.s file is copy from SPC5 studio. Could you provide me example code about the interrupt enable that don't using OSAL and HAL component with my vector table? |
|
|
|
你好汉克,
我们在SPC5Studio上没有示例(没有OSAL(HAL)) 你必须从头开始创建你的项目 RLA可能是一个很好的折衷方案。 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Hank , We have no example on SPC5Studio (without OSAL (HAL)) you have to create your project from scratch RLA could be a good compromise for you. Best regards Erwan |
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
927 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
983 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3146 浏览 1 评论
3411 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2003 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
160浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
177浏览 5评论
199浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
243浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
184浏览 5评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-7-13 02:01 , Processed in 0.628003 second(s), Total 48, Slave 43 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191