完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,在那里,我正在使用的微控制器是PIC32 MZ2048 ECH064。我将其设置为200MHz。这些是我的预取设置:PRECONbits.PFMSECEN=0;PRECONbits.PREFEN=0b11;PRECONbits.PFMWS=0b100;这就是我启用多向量中断的方法:void INTsystemMultiVectorEnable(void){/...为多向量模式INTCONSET配置中断控制器=_INTCON_MVEC_MASK;/...将CP0状态寄存器IE位设置为高以全局启用中断_u builtin_._inter.s();}//end void INTsystemMultiVectoredEnable(void)我的DMA变量以这种方式声明definitionADC_LI_BUFFER_SIZE_32768pragma udataunsigned char_.((连贯,对齐)ed(16))adcL1._A[ADC_LI_BUFFER_SIZE+1024];无符号char_.((相干,对齐(16))adcL1._B[ADC_LI_BUFFER_SIZE+1024];无符号char_.((相干))*adcL1bufferPo.;当我将缓冲区写入外部ram(使用SPI+DMA)时,缓冲区被重写。另一个中断。有没有其他人有相同类型的问题?
以上来自于百度翻译 以下为原文 Hi there, The microcontroller that I am using is the PIC32MZ2048ECH064. I have it setup to run at 200MHz. These are my prefetch settings: PRECONbits.PFMSECEN = 0; PRECONbits.PREFEN = 0b11; PRECONbits.PFMWS = 0b100; and this is how I enable my multi vector interrupts: void INTsystemMultiVectorEnable(void) { //...Configure Interrupt Controller for multi-vector mode INTCONSET=_INTCON_MVEC_MASK; //...Set the CP0 Status register IE bit high to globally enable interrupts __builtin_enable_interrupts(); }//end void INTsystemMultiVectoredEnable(void) My DMA variables are declared this way #define ADC_LI_BUFFER_SIZE 32768 #pragma udata unsigned char __attribute__ ((coherent, aligned(16)))adcL1buffer_A[ADC_LI_BUFFER_SIZE+1024]; unsigned char __attribute__ ((coherent, aligned(16)))adcL1buffer_B[ADC_LI_BUFFER_SIZE+1024]; unsigned char __attribute__((coherent)) *adcL1bufferPointer; when I write a buffer to the external ram (using SPI + DMA) , the buffer get overwritten when I enter another interrupt. Did anybody else have the same type of issues? |
|
相关推荐
1个回答
|
|
由于给出的信息量有限(启用Y时X不起作用),我们所能做的就是检查错误或猜测。与其猜测,不如发布更多的代码,给我们更好的发现错误的机会。
以上来自于百度翻译 以下为原文 With the limited amounts of information given (thing X doesn't work when thing Y is enabled) all we can do is check the errata or guess. Rather than guessing, why not post more of your code and give us a better chance at spotting errors? |
|
|
|
只有小组成员才能发言,加入小组>>
4828 浏览 9 评论
1832 浏览 8 评论
1752 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
2958 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2062 浏览 5 评论
463浏览 1评论
1112浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
366浏览 0评论
265浏览 0评论
LAN9252使用SQI通信,进行数字复位后读BYTE_TEST异常
1800浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-28 03:56 , Processed in 1.051833 second(s), Total 45, Slave 39 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号