完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,我正在尝试为我的应用程序实现EZBL。到目前为止,我已经能够编译EZBL,并为我的PIC24FJ128DA206配置它,它似乎上传我的应用程序很好。但是…我的应用程序使用相同的UART端口作为Bootloader。所以当我用EZBL配置我的应用程序时,我不能使用UART中断…我试着玩中断转发但没有成功…无论是引导加载程序还是我的UART工作,但我都可以同时拥有:(…在Bootloader代码中,在Mc.c中,我不注释这行:这应该将中断转发给我的应用程序。这似乎是在我这样做的时候,我可以使用UART……所以当我收到UART的一个特殊命令时,我会这样做。这:一旦做到了…我无法通过UART发送/接收字符,所以我猜想中断已经被转发,但是引导加载程序不再响应:(……我想我错过了什么……但是什么?谢谢你的帮助。
以上来自于百度翻译 以下为原文 Hello, I'm trying to implement EZBL for my application. So far I've been able to compile EZBL and configure it for my pic24fj128da206, and it's seems to upload my application just fine. But... my application use same UART port as the bootloader. So when I configure my application with EZBL I'm not able to use UART interrupts... I've tried to play with interrupts forwarding but without success.... either the bootloader works or my uart works but I can have both :(.. In the bootloader code, in main.c I uncommented this lines: EZBL_RAMSet((void*)&IEC0, 0x00, (unsigned int)&IPC0 - (unsigned int)&IEC0); EZBL_ForwardBootloaderISR = 0xFFFFFFFF; // Forward all Interrupts to the Application NOW_EndAllTasks(); This should forward the interrupts to my application. Well this seems to work as when i do this, I can use the uart... so when I receive a special command from the UART i do this: EZBL_RAMSet((void*)&IEC0, 0x00, (unsigned int)&IPC0 - (unsigned int)&IEC0); EZBL_ForwardBootloaderISR = 0x0; Once this is done... I can no longer send/received characters throught the UART so I guess the interrupts have been forwarded, but the bootloader does not respond anymore :(.... I guess I miss something... but what ? Thanks for your help. |
|
相关推荐
7个回答
|
|
现在,我发现了一个解决办法,但不是很满意……而不是将中断转发到引导装载器,我只是轻轻地重置我的应用程序,因此它在引导加载程序中重新启动,并且在引导加载程序超时之前发送新固件…它确实起作用,但我更愿意转发。中断到引导加载程序…
以上来自于百度翻译 以下为原文 Well, I found a workaround for now, but not very satifying... Instead of forwarding back the interrupts to the bootloader I just soft reset my application, therefore it restart in bootloader, and I send the new firmware before the bootloader timeout... It does work, but I would prefer to forward the interrupts back to the bootloader ... |
|
|
|
您好,您使用的是EZBL(V2.04)的新版本吗?当做
以上来自于百度翻译 以下为原文 Hi, Are you using the new version of EZBL (v2.04) ? Regards |
|
|
|
格罗巴特,不知道你是否还需要帮助,但我成功地实现了同样的情景。BL和APP在UART上使用相同的RX和TX int(和定时器INT)。在启动过程中,所有的互通都被转发到应用程序,以使应用程序能够使用资源。通过用户命令(或任何触发它)中断控制被传递回Bootloader BYEZBLYPRONDBODBOOLTER ISR= 0x90000;/ /切换到Bootloader不要忘记启动UART模块、PPS引脚或创建引导加载程序需要通信的环境所需的任何内容。作品完美…米迦勒
以上来自于百度翻译 以下为原文 @Grobatt, don't know if you still need help, but I have implemented exactly the same scenario with success. BL and app using same RX&TX INT on UART (and timer INT). During start, all interupts are forwarded to the app to enable the app to use the resources. By user command (or whatever triggers it) interrupt control is passed back to the bootloader by EZBL_ForwardBootloaderISR = 0x00000000; //switch over to bootloader Don't forget to start the UART module, PPS pins or whatever is needed to create the environment the boot loader needs to communicate. Works perfect.. Regards Michael |
|
|
|
嗨,我也有类似的问题。中断转发是双向工作的,我也可以使用BL来更新代码,但是当中断被转发到Bootloader中时,在我尝试上传新的应用程序之前,其中的代码没有执行,所以我不能像我希望的那样在超时后将这些插入符传递回应用程序。那么,如何引导引导程序运行@ dg5MK?问候约斯特
以上来自于百度翻译 以下为原文 Hi, I have a similar problem. Interrupt forwarding works both ways, I am also able to update the code using BL, but when the interrupts are forwarded to bootloader the code in there is not executing until I try to upload new app, so I cannot pass the intereupts back to app after a timeout as I would like to. So how do you get the bootloader running @DG5MK ? Regards Jost |
|
|
|
约斯特,BL代码是什么意思,直到更新新的应用程序才执行。如果更新工作,则代码正在执行。关于没有更新就返回应用程序的问题是什么?我只是关掉了设备。BL认识到仍然有一个有效的应用程序并传递给应用程序。问候米迦勒
以上来自于百度翻译 以下为原文 Jost, what do you mean by BL code not executing until you update new app. If update works the code is executing. Is the question about going back to the app without updating? I simply switch off the device. BL recognizes that there is still a valid app and passes over to the app. Regards Michael |
|
|
|
GT是不是在不更新的情况下回到应用程序的问题?是的,这正是我想要做的。Bootloader应该执行一些任务,如果没有更新请求超时,应用程序将继续运行。
以上来自于百度翻译 以下为原文 >>Is the question about going back to the app without updating? Yes thats what I am trying to do. The bootloader should be doing some tasks and after a timeout if there is no update request the app continues running. |
|
|
|
在EZBL ExxBototuUARDEMO项目的Mem.C中:/ /可选地关闭所有Bootloader ISRs,并将//中断转发给应用程序,使我们成为被动的经典/ /引导加载程序。/Note:如果你这样做,你放弃了有用的时间和通信API。此外,自动引导加载程序唤醒//.BL2文件演示将不起作用。为了最小化Flash,//app可以只重用Bootloader API,保持//现在定时器中断和通信ISRS在/ /后台中活跃(其中运行时执行开销最小)。//EZBLY RAMSET((空*)和IEC0,0x00,(未签名int)和IPC0-(未签名INT)和IEC0;/ /清除所有IECX中断启用寄存器中的每一位/ / EZBLYPRONDBODLUBIDER ISR= 0xFFFFFFF;/ /转发所有中断到应用程序/NojnEndoAlTrasks-();/ /终止EZBLIB BooToBultTask()FROM通过后台执行ISR,当NoWix32()或NoWi64()调用时,它间接需要定时器ISR来执行并执行进位传播。如果使用此方法将中断转发到应用程序,则自动引导加载程序唤醒。BL2文件演示不起作用。
以上来自于百度翻译 以下为原文 In main.c of the EZBL ex_boot_uart demo project: // Optionally turn off all Bootloader ISRs and forward the // interrupts to the Application so we become a passive classic // bootloader. // NOTE: You are giving up useful timing and communications APIs // if you do this. Also, the automatic bootloader wakeup upon // .bl2 file presentation won't work. To minimize flash, the // App can just reuse the bootloader APIs as is, keeping the // NOW Timer interrupt and communications ISRs active in the // background (which have minimal run-time execution cost). //EZBL_RAMSet((void*)&IEC0, 0x00, (unsigned int)&IPC0 - (unsigned int)&IEC0); // Clear every bit in all IECx Interrupt Enable registers //EZBL_ForwardBootloaderISR = 0xFFFFFFFF; // Forward all Interrupts to the Application //NOW_EndAllTasks(); // Terminates the EZBL_BootloaderTask() from executing via background NOW ISR and when a NOW_32() or NOW_64() call is made which indirectly needs the timer ISR to execute and perform a carry propagation. If we forward the interrupts to the Application using this method, the automatic bootloader wakeup upon .bl2 file presentation won't work. |
|
|
|
只有小组成员才能发言,加入小组>>
5129 浏览 9 评论
1985 浏览 8 评论
1914 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3152 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2212 浏览 5 评论
699浏览 1评论
588浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
470浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
605浏览 0评论
497浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-4 11:15 , Processed in 1.279760 second(s), Total 91, Slave 74 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号