完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
主题总结了我的苦恼,但我会试着扩大一下。并解释为什么PIC24的替代中断向量表如此有用。基本上在PIC24FJ上,我有一个Bootloader,它使用USB来装载新的固件。我的设备只是接通电源,然后检查是一个USB设备,连接着新代码,如果是这样,就把新固件编程到闪存中。引导加载程序使用中断向量表(IVT),但是作为新固件编程的一部分,它将把固件的中断向量写到备选中断向量表(AIVT)。G使用AIVT并跳转到固件。如果在上电时没有USB连接,因此没有新的固件,那么只需设置AIVT并跳转到已经安装的固件。这意味着Bootloader可以使用中断,固件也可以使用中断,但是它们映射到不同的向量。我对此有不好的感觉。必须睡在这上面。似乎只给定一个中断向量表,引导加载程序就不能使用中断,但我假设USB依赖于它们。
以上来自于百度翻译 以下为原文 Subject sort of sums up my woes, but I'll try and expand on them a little. And explain why the PIC24's Alternative Interrupt Vector Table was so so useful. Basically on the PIC24FJ I have a Bootloader which uses USB to load up new Firmware. My device simply powered up and checked was a USB device connected with new code and if so read the new firmware programming it into the flash. The Bootloader used the Interrupt Vector Table (IVT) but as part of its programming of new firmware it would write the firmware's Interrupt vectors to the Alternative Interrupt Vector Table (AIVT). Once the Bootloader had finished programming the new firmware it would set the micro-controllers config to use the AIVT and jump to the firmware. If on powerup there was no USB connected, hence no new firmware it would simple set the AIVT and jump to the already installed Firmware. This all means that the Bootloader could use Interrupts and the Firmware could also use Interrupts but they mapped to different vectors. Like the subject says I'm migrating to a dsPIC33EP256MU806 which shock horror has no AIVT. I have a bad feeling about this. Have to sleep on this one. Seems like given only one Interrupt Vector Table the bootloader can't use Interrupts, but USB I'm assuming depends on them. |
|
相关推荐
5个回答
|
|
思考我自己的问题。我真的应该检查USB使用中断这个问题都可能是无用的。
以上来自于百度翻译 以下为原文 Pondering on my own problem. I should really check does USB use interrupts this question could all be for nothing. |
|
|
|
艾维特在记忆的第一页。你需要擦除IVT并重置向量来重写它。当这个区域被擦除时,如果有什么不好的事情发生(例如,电源丢失),你的芯片被阻塞了。我认为MU已经复位,并且在他们的辅助闪存中具有基本的IVT。
以上来自于百度翻译 以下为原文 AIVT is in the first page of the memory. You need to erase IVT and reset vector to re-write it. While this area is erased, if something bad happens (e.g. power lost), your chip is bricked. I think MU have reset and rudimentary IVT in their Aux flash memory. |
|
|
|
没多久。是的,USB使用中断。所以现在我有一个问题,因为我正在使用微芯片的USB堆栈,所以没有访问他们的USB中断源来稍微改变它
以上来自于百度翻译 以下为原文 That didn't take long. Yes USB Uses Interrupts. So now I have a problem as I am using Microchip's USB stack so don't have access to their USB Interrupt source to change it slightly |
|
|
|
是的,但不是!是的,PIC24的AIVT在Flash的第一页,但是诀窍在于,你不把向量存储在那里,你只是把向量存储到向量中。所以让我们说,引导加载坐在较低的地址,固件从0x88开始。保持相同的中断向量表结构,可以说固件的向量从地址0x8804开始,运行到0x88 FE。鉴于Flash第一页中的AIVT包含的是跳转地址0x8804、0x8806、0x8808……因此,每一次中断都要花费额外的一跳,但您已经获得了一个可爱的小引导程序。
以上来自于百度翻译 以下为原文 Yes but No! Yes the AIVT of the PIC24 is in the first page of Flash but the trick is that you don't store the Vectors there you just store the vectors to the vectors. So lets say that the Bootload sits down in the lower address and that firmware starts at 0x8800. Keeping the same Interrupt Vector table structure you can say that the Firmware's Vectors start at address 0x8804 and run up to 0x88FE. Given that all that the AIVT in the first page of Flash contains is the jump address 0x8804, 0x8806, 0x8808 ...... So you've cost yourself an extra jump with each Interrupt but you've gained a sweet little bootloader. |
|
|
|
@arigead,在设计引导加载器时,PIC33EP256MU806与pic24fj是完全不同的动物。必须改变自编程序。有多种替代向量的实现方式。EP范围在这里不一致,也意味着NVMOP代码在设备之间不同。一些设备提供与FJ类似的配置,但是需要设置CONFIG位。一些设备具有单个替代中断向量(all中断(MU806)一些具有可寻址的AIVT,可以位于不同的地址。MU806中的辅助闪存是针对与引导加载程序/BIOS一起使用的。但是检查一下勘误表,找到所有的信息就像是一部丹·布朗小说,环游世界寻找线索!不幸的是,我不能看到一个通用的EP引导加载器是可能的,因为它需要知道其内部架构。祝你的追求好运!Yorky!
以上来自于百度翻译 以下为原文 @ arigead, the PIC33EP256MU806 is a totally different animal to the pic24fj when designing a boot loader. The self programming has to be changed. There are a number of types of implementations for the Alternative Vectors. The EP range is inconsistent here and also means the NVMOP codes differ between devices. Some devices provide a similar arrangement to the FJ but needs CONFIG bits setting up. Some have a single Alternative Interrupt Vector (all interrupts) (MU806) Some have an addressable AIVT that can be located at different addresses. The Aux Flash in the MU806 is targeted for use with a boot loader/BIOS. But check the Errata. Finding all the information is like a Dan Brown novel, travelling the world looking for clues! Unfortunately I can not see a generic EP boot loader being possible as it would need to know its internal architecture. Good luck on your quest!! T Yorky |
|
|
|
只有小组成员才能发言,加入小组>>
5166 浏览 9 评论
2000 浏览 8 评论
1929 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3175 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2227 浏览 5 评论
736浏览 1评论
619浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
507浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
633浏览 0评论
530浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 06:27 , Processed in 1.304535 second(s), Total 87, Slave 70 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号