完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
HI使用和声来设置引导加载程序。我用手工创建TMR1,现在期待一个中断。我看到IEC0.T1IE是好的,我可以看到IFS0.T1IF在TMR1超出预期时被设置,但是中断永远不会被触发。在PIC32 MX70F512L XC32 1.42中运行,我正忙着在GSM网络上引导引导程序。我的服务器和MySQL数据库一样,存储了十六进制文件。需要一个计时器来实现超时和服务器相关的交互功能。有什么想法吗?
以上来自于百度翻译 以下为原文 Hi All Using HARMony to setup a bootloader project. I created TMR1 by hand and now expect an interrupt. I see in IEC0.T1IE is good and I can see in IFS0.T1IF is set when TMR1 over flow as expected, but the interrupt never get fired. Running on PIC32MX270F512L XC32 1.42 I'm busy with a bootloader over GSM network. My server is done as well as mySQL db where the HEX file is stored. Need a timer to implement time outs and server related interactive functions. Any ideas?__asm__("DI"); PR1 = 63000; TMR1=0; T1CONbits.TCKPS = 1; T1CONbits.TCS = 0; T1CONbits.ON = 1; IPC1bits.T1IP=2; IPC1bits.T1IS=0; IFS0bits.T1IF=0; IEC0bits.T1IE=1; __asm__("EI"); void __ISR(_TIMER_1_VECTOR, ipl6AUTO) _TimerISR(void) { IFS0bits.T1IF = 0; Nop(); Nop(); } |
|
相关推荐
9个回答
|
|
|
你还有其他的干扰吗?我的第一个猜测是Bootloader的中断向量/链接器问题。你能显示你的链接器和你的中断配置代码吗?(对不起,我正在猜测,我以前没有使用和声,所以我不确定它会处理什么)
以上来自于百度翻译 以下为原文 Do you have other interrupts working yet? My first guess would be an interrupt vector/linker issue for the bootloader. Can you show your linker and your interrupt config code? (Sorry I am making a couple guesses, I have not used Harmony before so am not sure what it handles) |
|
|
|
|
|
你好。是的,UART中断是工作/*缺省链接器脚本,对于正常的可执行文件*/OutPuxField(“Eff32 TrutLtILMIPS”)OutPuthARCH(PIC32 MX)条目(重置)/**提供一个最小的堆栈和堆大小*-Mymi-Stasksize,表示必须为堆栈提供的最小空间。可以使用链接器-DeSym选项从命令行重写。*-MixHeaPixSigabor表示必须为堆提供的最小空间。可以使用链接器-DeSym选项从命令行重写。*/Extn(μmin StasksiSmith-Min HeAPPLE大小)/**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************包含SFR定义。********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************关于中断向量处理的文件/附件(“LBMCHPB外设A”)/ ****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************。电路内调试执行大小** GnEnEXPTPADADDR——一般的异常向量*********************/*ReSeTyAdDR=0xBFC000;γBEVYExpPTIAdDR=(0xBFC00+0x380);0x760;所有的C文件将位于*/KSG00BoToMeMe:Ont= 0x9Fc000,长度=0x0/*。这个内存区域是哑*/CONT3:ORACE=0xBFC0。0BF0,长度=0x4配置2:原点=0xbfc00 bf4,长度=0x4配置1:原点=0xbfc00 bf8,长度=0x4配置0:原点=0xbfc00 bfc,长度=0x4kSeG1BooToMeM:原点=0xbfc000,长度=0x300/*c启动代码*/KSEG1XDATAYMEM(W)!X):Oracle=0xA000 000,长度=0x10000个SFRS:原点=0xBF8000,长度=0x100000 Debug gExcel。MEM:原点=0x9FC0490,长度=0x760配置FRS:Orthe= 0xBFC000 BF0,长度=0x10}
以上来自于百度翻译 以下为原文 Hi. Yes the UART interrupt is working /* Default linker script, for normal executables */ OUTPUT_FORMAT("elf32-tradlittlemips") OUTPUT_ARCH(pic32mx) ENTRY(_reset) /* * Provide for a minimum stack and heap size * - _min_stack_size - represents the minimum space that must be made * available for the stack. Can be overridden from * the command line using the linker's --defsym option. * - _min_heap_size - represents the minimum space that must be made * available for the heap. Can be overridden from * the command line using the linker's --defsym option. */ EXTERN (_min_stack_size _min_heap_size) /************************************************************************* * Processor-specific object file. Contains SFR definitions. *************************************************************************/ INPUT("processor.o") /************************************************************************* * Processor-specific peripheral libraries are optional *************************************************************************/ OPTIONAL("libmchp_peripheral.a") /************************************************************************* * For interrupt vector handling *************************************************************************/ PROVIDE(_vector_spacing = 0x00000001); _ebase_address = 0x9D000000; /************************************************************************* * Memory Address Equates * _RESET_ADDR -- Reset Vector * _BEV_EXCPT_ADDR -- Boot exception Vector * _DBG_EXCPT_ADDR -- In-circuit Debugging Exception Vector * _DBG_CODE_ADDR -- In-circuit Debug Executive address * _DBG_CODE_SIZE -- In-circuit Debug Executive size * _GEN_EXCPT_ADDR -- General Exception Vector *************************************************************************/ _RESET_ADDR = 0xBFC00000; _BEV_EXCPT_ADDR = (0xBFC00000 + 0x380); _DBG_EXCPT_ADDR = (0xBFC00000 + 0x480); _DBG_CODE_ADDR = 0x9FC00490; _DBG_CODE_SIZE = 0x760; _GEN_EXCPT_ADDR = _ebase_address + 0x180; /************************************************************************* * Memory Regions * * Memory regions without attributes cannot be used for orphaned sections. * Only sections specifically assigned to these regions can be allocated * into these regions. *************************************************************************/ MEMORY { kseg0_program_mem (rx) : ORIGIN = 0x9D000000, LENGTH = 0x2000 /* All C Files will be located here */ kseg0_boot_mem : ORIGIN = 0x9FC00000, LENGTH = 0x0 /* This memory region is dummy */ config3 : ORIGIN = 0xBFC00BF0, LENGTH = 0x4 config2 : ORIGIN = 0xBFC00BF4, LENGTH = 0x4 config1 : ORIGIN = 0xBFC00BF8, LENGTH = 0x4 config0 : ORIGIN = 0xBFC00BFC, LENGTH = 0x4 kseg1_boot_mem : ORIGIN = 0xBFC00000, LENGTH = 0x300 /* C Startup code */ kseg1_data_mem (w!x) : ORIGIN = 0xA0000000, LENGTH = 0x10000 sfrs : ORIGIN = 0xBF800000, LENGTH = 0x100000 debug_exec_mem : ORIGIN = 0x9FC00490, LENGTH = 0x760 configsfrs : ORIGIN = 0xBFC00BF0, LENGTH = 0x10 } |
|
|
|
|
|
这对我来说不太正确,我想您需要用EBASE和ExabutyMeM指定引导加载程序IVT的空间。对于我来说,我把它放在Booflash基+0x1000:
以上来自于百度翻译 以下为原文 This doesn't look quite right to me, I think you need to designate space for the bootloader IVT with ebase and exception_mem. For mine, I put it in the bootflash base +0x1000: /************************************************************************* * For interrupt vector handling *************************************************************************/ PROVIDE(_vector_spacing = 0x00000001); _ebase_address = 0x9FC01000; /************************************************************************* * Memory Address Equates * _RESET_ADDR -- Reset Vector * _BEV_EXCPT_ADDR -- Boot exception Vector * _DBG_EXCPT_ADDR -- In-circuit Debugging Exception Vector * _DBG_CODE_ADDR -- In-circuit Debug Executive address * _DBG_CODE_SIZE -- In-circuit Debug Executive size * _GEN_EXCPT_ADDR -- General Exception Vector *************************************************************************/ _RESET_ADDR = 0xBFC00000; _BEV_EXCPT_ADDR = (0xBFC00000 + 0x380); _DBG_EXCPT_ADDR = (0xBFC00000 + 0x480); _DBG_CODE_ADDR = 0xBFC02000; _DBG_CODE_SIZE = 0xFF0 ; _GEN_EXCPT_ADDR = _ebase_address + 0x180; /************************************************************************* * Memory Regions * * Memory regions without attributes cannot be used for orphaned sections. * Only sections specifically assigned to these regions can be allocated * into these regions. *************************************************************************/ MEMORY { kseg0_program_mem (rx) : ORIGIN = 0x9D000000, LENGTH = 0x08000 /* All C Files will be located here */ kseg0_boot_mem : ORIGIN = 0x9FC00490, LENGTH = 0x0 /* This memory region is dummy */ exception_mem : ORIGIN = 0x9FC01000, LENGTH = 0x1000 /* Interrupt vector table */ kseg1_boot_mem : ORIGIN = 0xBFC00000, LENGTH = 0x490 /* C Startup code */ debug_exec_mem : ORIGIN = 0xBFC02000, LENGTH = 0xFF0 config3 : ORIGIN = 0xBFC02FF0, LENGTH = 0x4 config2 : ORIGIN = 0xBFC02FF4, LENGTH = 0x4 config1 : ORIGIN = 0xBFC02FF8, LENGTH = 0x4 config0 : ORIGIN = 0xBFC02FFC, LENGTH = 0x4 kseg1_data_mem (w!x) : ORIGIN = 0xA0000000, LENGTH = 0x10000 sfrs : ORIGIN = 0xBF800000, LENGTH = 0x100000 configsfrs : ORIGIN = 0xBFC02FF0, LENGTH = 0x10 } |
|
|
|
|
|
我想你可能会在这里得到一些反馈。我错过了EBASE…
以上来自于百度翻译 以下为原文 DAH, I think you might have something here ...... Will give feedback. I missed the ebase.... |
|
|
|
|
|
嗨,所以我意识到我的脚本出了问题。我从MHCP OrthyMyType提供的缺省A开始了。任何建议SypSysField.Htime1都设置为静态。我丢失了一些东西。
以上来自于百度翻译 以下为原文 Hi So I realized that there is something wrong with my script. I have started with the default a supplied by MHCP Harmony My Timer is still not firing. Any suggestionsPROVIDE(_vector_spacing = 0x00000001); _ebase_address = 0x9FC01000; /************************************************************************* * Memory Address Equates * _RESET_ADDR -- Reset Vector * _BEV_EXCPT_ADDR -- Boot exception Vector * _DBG_EXCPT_ADDR -- In-circuit Debugging Exception Vector * _DBG_CODE_ADDR -- In-circuit Debug Executive address * _DBG_CODE_SIZE -- In-circuit Debug Executive size * _GEN_EXCPT_ADDR -- General Exception Vector *************************************************************************/ _RESET_ADDR = 0xBFC00000; _BEV_EXCPT_ADDR = 0xBFC00380; _DBG_EXCPT_ADDR = 0xBFC00480; _DBG_CODE_ADDR = 0xBFC02000; _DBG_CODE_SIZE = 0xFF0 ; _GEN_EXCPT_ADDR = _ebase_address + 0x180; /************************************************************************* * Memory Regions * * Memory regions without attributes cannot be used for orphaned sections. * Only sections specifically assigned to these regions can be allocated * into these regions. *************************************************************************/ MEMORY { kseg0_program_mem (rx) : ORIGIN = 0x9D000000, LENGTH = 0x8000 /* All C Files will be located here */ kseg0_boot_mem : ORIGIN = 0x9FC00490, LENGTH = 0x970/* This memory region is dummy */ exception_mem : ORIGIN = 0x9FC01000, LENGTH = 0x200 /* Interrupt vector table */ config3 : ORIGIN = 0xBFC02FF0, LENGTH = 0x4 config2 : ORIGIN = 0xBFC02FF4, LENGTH = 0x4 config1 : ORIGIN = 0xBFC02FF8, LENGTH = 0x4 config0 : ORIGIN = 0xBFC02FFC, LENGTH = 0x4 kseg1_boot_mem : ORIGIN = 0xBFC00000, LENGTH = 0x490 /* C Startup code */ kseg1_data_mem (w!x) : ORIGIN = 0xA0000000, LENGTH = 0xCBAC/*0x20000*/ sfrs : ORIGIN = 0xBF800000, LENGTH = 0x100000 debug_exec_mem : ORIGIN = 0xBFC02000, LENGTH = 0xFF0 configsfrs : ORIGIN = 0xBFC02FF0, LENGTH = 0x10 } system_config.h 2)The base address and end address must align on boundaries according to the flash page size */ #define BOOTLOADER_FLASH_BASE_ADDRESS (0x9D000000 + 0x8000) #define BOOTLOADER_FLASH_END_ADDRESS (0x9D000000 + 0x80000 - 1) Timer1 is setup as static. I'm missing something |
|
|
|
|
|
我注意到,在地图文件中,中断向量4不在链接器脚本中所述的地址。Text。Sysx DeVCONYO任务0x9D00 2510 0x8 8。矢量26 26 0x9D00 2518 0x8 8中断向量26。矢量331 0x9D00 25020 0x8 8中断向量31。矢量400x9D252528 0x8 8中断向量4。ON ON重置0x9D90025300x8 8。
以上来自于百度翻译 以下为原文 I have noticed in the map file that the interrupt vector 4 is not at the address as stated in the linker script .text.SYS_DEVCON_Tasks 0x9d002510 0x8 8 .vector_26 0x9d002518 0x8 8 Interrupt Vector 26 .vector_31 0x9d002520 0x8 8 Interrupt Vector 31 .vector_4 0x9d002528 0x8 8 Interrupt Vector 4 .text._on_reset 0x9d002530 0x8 8 .text._on_bootstrap 0x9d002538 0x8 8 |
|
|
|
|
|
我的印象是,使用具有相同尺寸闪存的PIC32 MX将在所有PIC32 MX设备上表现(具有相同的MEM映射)。两年前,我为PIC32 MX795F512L做了一个引导加载程序,并希望在PIC32 MX27 0F512L上使用相同的引导加载程序(稍加改动),但在不理解乳清三天之后,我的中断没有启动。我已经看到了光。为什么编译器允许我写的MEM部分没有出现在MEM地图?
以上来自于百度翻译 以下为原文 I was under the impression that using a PIC32MX with the same size flash would behave (have the same mem map) over all the PIC32MX devices. Mistake one! I did a Bootloader for a PIC32MX795f512L two years ago, and wanted to use the same bootloader (with a few changes) on a PIC32MX270F512L but after three days of not understanding whey my Interrupts are not firing. I have seen the light. Why would the compiler allow me to write to mem sections that does not appear in the mem map? |
|
|
|
|
|
您好,对不起,如果这与这个帖子无关,我正在检查这两个线程中的人建议的链接器,是使用Bootloader链接器脚本中使用的EaseBaseAddio= 0x9FC01000;或者是.BaseXAddio= 0x9D900Mo之间的区别?当做,
以上来自于百度翻译 以下为原文 Hello, Sorry if this not related with this post, i was checking the linker that both people suggested in this thread, and was the difference between using _ebase_address = 0x9FC01000; or _ebase_address = 0x9D000000; in the bootloader linker script? Regards, |
|
|
|
|
|
HiYour ebase地址是你的例外地址,它取决于你使用的是哪一个MCU。如果你的MCU的BooFlash小于12K,我建议把所有的东西都放在你的程序Flash中,也许在BooFlash中留下调试部分。
以上来自于百度翻译 以下为原文 Hi Your ebase address is your exception_mem address it all depends on which MCU you are using. if your mcu had bootflash smaller than 12K I would suggest to put everything in your program flash, maybe leave the debug section in bootflash |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1124浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1095浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 04:24 , Processed in 1.005545 second(s), Total 86, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
640