1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
有人能告诉我PIC32 mm的软替换()是否正确替换?看起来SoftReset来自传统的PLIB。我正在尝试重用旧的PIC32MX代码,并且看起来PLIB不支持PIC32MM。我发现一篇文章推荐PIC32MZ的_u pic32_._reset()替代方案,但是我不确定这对PIC32MM是否正确。谢谢
以上来自于百度翻译 以下为原文 Can someone point me to the correct replacement of SoftReset() for PIC32MM? It looks like SoftReset is from legacy PLIB. I am trying to reuse old PIC32MX code and looks like PIC32MM is not supported in PLIB. I found one post that is recommending __pic32_software_reset() alternative for PIC32MZ, but I am not sure if this is a correct for PIC32MM Thank you |
|
相关推荐
3个回答
|
|
这就是我在MX和MZ上都用到的,并且可以工作:编辑:如果内存提供服务,在执行上面的代码之前,您需要解锁序列。
以上来自于百度翻译 以下为原文 This is what I use on both MX and MZ and works: RSWRSTSET = _RSWRST_SWRST_MASK; RSWRST; while(1); Edit: if memory serves you need the unlock sequence before executing the code above. |
|
|
|
谢谢你的回复。我实际上在MX手册中找到了类似的序列,只是不确定如果在PIC32 MMHTTP://WW1.MICCHIP.CON/DeLoSs/En/DeVICECD/61118B.PDF页11中工作的方式是相同的,除了解锁之外,它还需要同时或4个NOP。
以上来自于百度翻译 以下为原文 Thank you for reply. I actually found the similar sequence int the MX manual, just not sure if this works the same way on PIC32MM http://ww1.microchip.com/downloads/en/DeviceDoc/61118B.pdf page 11 In addition to the Unlock, it requires while or 4 NOPs at the end as well /* perform a system unlock sequence */ SYSTEMUnlock(); /* set SWRST bit to arm reset */ RSWRSTSET = 1; /* read RSWRST register to trigger reset */ volatile int* p = &RSWRST; *p; /* prevent any unwanted code execution until reset occurs*/ while(1); |
|
|
|
实际上我尝试了_u pic32_._reset(),我在最初的文章中提到过,它也可以工作。我找到了另一本手册,它涉及整个P32家族,并且如果具有类似的序列:http://ww1.micro..com/...eviceDoc/60001118H.pdf。
以上来自于百度翻译 以下为原文 I actually tried __pic32_software_reset() that I mentioned in the initial post and it works as well. I found another manual that refer to the whole P32 family and if has a similar sequence: /* The following code illustrates a software Reset */ // assume interrupts are disabled // assume the DMA controller is suspended // assume the device is locked /* perform a system unlock sequence */ // starting critical sequence SYSKEY = 0x00000000; //write invalid key to force lock SYSKEY = 0xAA996655; //write key1 to SYSKEY SYSKEY = 0x556699AA; //write key2 to SYSKEY /* set SWRST bit to arm reset */ RSWRSTSET = 1; /* read RSWRST register to trigger reset */ unsigned int dummy; dummy = RSWRST; /* prevent any unwanted code execution until reset occurs*/ while(1); http://ww1.microchip.com/...eviceDoc/60001118H.pdf |
|
|
|
只有小组成员才能发言,加入小组>>
5237 浏览 9 评论
2027 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3202 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
772浏览 1评论
662浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
590浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
672浏览 0评论
572浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 22:28 , Processed in 1.340388 second(s), Total 79, Slave 64 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号