完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
大家好,
我正在使用SPC56EL70L5.Trying配置FCCU,我编码: & sharpdefine CTRLK_OP1 0x913756AF & sharpdefine CTRLK_OP2 0x825A132B //操作所需的密钥 & sharpdefine CTRL_OPR1 1 & sharpdefine CTRL_OPS3 3 uint32_t FCCU_CONFIG_STATE(void){ / * ----------------- CONFIG State --------------------- * / FCCU.CTRLK.R = CTRLK_OP1; / *操作OP1的键* / FCCU.CTRL.R = CTRL_OPR1; / *将FCCU设置为CONFIG状态[OP1] * / while(FCCU.CTRL.B.OPS!= CTRL_OPS3); / *等待操作完成* / 返回1; } 但是条件永远不会被验证:FCCU.CTRL.OPS是0x02(这意味着操作被中止)并且MCU暂停。 哪里出错了? 先谢谢您的帮助。 #leopard #fccu#spc56 以上来自于谷歌翻译 以下为原文 Hello everybody, I'm using the SPC56EL70L5.Trying to configure the FCCU, I coded: &sharpdefine CTRLK_OP1 0x913756AF &sharpdefine CTRLK_OP2 0x825A132B //keys needed for operation &sharpdefine CTRL_OPR1 1 &sharpdefine CTRL_OPS3 3 uint32_t FCCU_CONFIG_STATE(void){ /* ----------------- CONFIG State --------------------- */ FCCU.CTRLK.R = CTRLK_OP1; /* Key for the operation OP1 */ FCCU.CTRL.R = CTRL_OPR1; /* Set the FCCU into the CONFIG state [OP1] */ while(FCCU.CTRL.B.OPS != CTRL_OPS3); /* wait for the completion of the operation */ return 1; } But condition is never verified: FCCU.CTRL.OPS is 0x02 (that means operation is aborted) and MCU hangs in the while. Where is the mistake? Thanks in advance for the help. #leopard #fccu #spc56 |
|
相关推荐
25个回答
|
|
你好Stefano,
您的FCCU配置似乎已被锁定 当FCCU状态正常或配置锁定时执行OP1(CONFIG命令) RM对此并不清楚。 我正在检查我的身边。 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Stefano , your FCCU configuration seems to be locked OP1 (CONFIG command) execution when FCCU state ≠NORMAL or configuration locked the RM is not clear about that. I am checking in my side. Best Regards Erwan |
|
|
|
你好Stephano,
你能试试这个应用笔记吗? 它应该帮助你 http://www.st.com/web/en/resource/technical/document/application_note/DM00057153.pdf 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Stephano , could you try this application note ? it should help you http://www.st.com/web/en/resource/technical/document/application_note/DM00057153.pdf Best regards Erwan |
|
|
|
你好Stephano,在应用笔记中:CFG Timeout正在增加到~8ms你能试试吗? BR二湾
以上来自于谷歌翻译 以下为原文 Hello Stephano , in the application note : the CFG Timout is increasing into ~8ms
Could you try this ?? BR Erwan |
|
|
|
是的,我已经在使用它,它非常有用。
我想我部分解决了我的问题(如果我错了请纠正我):我认为调试器也会停止超时,但如果我一步一步地执行代码,我将得到错误。执行所有指令而不间断,似乎可以正确配置。 我还有另一个问题,我正在努力解决,稍后我会问你是否能解决这个问题。 感谢您的帮助和及时的回复。 以上来自于谷歌翻译 以下为原文 Yes, i'm already using it and it's very useful. I think I partially solved my problems (please correct me if I'm wrong): I assumed that debugger would stop timeouts too, but if I execute the code step by step I will get the error. Executing all instructions without breaks in between seems to work with correct configuration. I've another side issue that I'm trying to solve, I'll ask you later if i will not be able to solve that. Thanks for the help and for the prompt reply. |
|
|
|
你好Stefano,
您可以尝试通过设置OP15来重置状态,然后再进入CONFIG模式吗? 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Stefano , Could you try to reset the status by setting OP15 before to go in CONFIG mode?
Best Regards Erwan |
|
|
|
感谢您的建议,但行为保持与我描述的相同,即使使用建议的改进。
以上来自于谷歌翻译 以下为原文 Thanks for the suggestions, but behaviour keeps the same as I described even using the suggested improvements. |
|
|
|
令我困扰的另一个问题是,即使在应用笔记中有关于''FCCU严重故障注入(无NMI断言)'的指示,系统也无法成功恢复。注入后,在ME_GS中有一个复位和SAFE状态的成功断言,但是在osal.c中,MCU会在下面挂起
#if!defined(__ DOXYGEN__) __attribute __((弱,noreturn)) #万一 void osalSysHalt(const char * reason){ osalIsrDisable(); osal_halt_msg = reason; 而(1); } 原因是0x1F50 - > ''时钟失败''。 我做了几次尝试,但我无法解决它,我基本上没有相关的文档。 先谢谢您的帮助。 以上来自于谷歌翻译 以下为原文 The other problem that is troubling me a lot is that, even following indications about ''FCCU critical fault injection (no NMI assertion)'' in the application note, the system does not successfully recover. After the injection there is a reset and a successful assertion of SAFE state in ME_GS, but then MCU hangs during the following while in osal.c #if !defined(__DOXYGEN__) __attribute__((weak, noreturn)) #endif void osalSysHalt(const char *reason) { osalIsrDisable(); osal_halt_msg = reason; while (1); } with the reason 0x1F50 -> ''clock failure''. I have done several tries but I can't fix it and I have basically no documentation about that. Thanks in advance for the help. |
|
|
|
你好Stefano,
我确认在FCCU配置期间使用调试器(逐步)是goint生成OPS Aborted。 关于您的问题,您能将您的堆栈功能和代码示例(SPC5Studio示例)发送给我吗? 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Stefano , i confirm that using the debugger (step by step) during the FCCU configuration is goint to generate OPS Aborted. About your issue , could you send me your stack function and your code example (SPC5Studio Example) ? Best Regards Erwan |
|
|
|
谢谢,您的确认确实帮助我对设备充满信心。
我发现挂起时附加了我正在使用的代码和调用堆栈(如果这不是你要求的,请告诉我,我不确定) 再次感谢您的帮助。 以上来自于谷歌翻译 以下为原文 Thanks, your confirmation really helps me to gain confidence with the device. I attached the code I'm using and the call stack when the hang occurs (please warn me if this is not what you asked for, I'm not sure) Thanks again for the help. |
|
|
|
你好Stephano,
由于在安全模式下的spc_clock_init(),断言发生 DRUN州等待。 / *如果不是这种情况,系统必须在进入时处于DRUN模式 它被认为是严重的异常现象。* / 根据图305, 不需要再次重新初始化时钟 它不是破坏性重置。 在configuration.xml中,您应该添加: (Cf截图) 用于预时钟初始化代码 if(ME.GS.B.S_CURRENT_MODE!= 2){ 后时钟初始化代码: { 有了这个补丁,我认为你的测试已通过;-) 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Stephano , the assert happenned because of in spc_clock_init() in SAFE Mode the DRUN State is waited. /* The system must be in DRUN mode on entry, if this is not the case then it is considered a serious anomaly.*/
according to the figure 305, it is not needed to reinitialize again the clock it is not a destructive reset. in the configuration.xml , you should add : (Cf Screenshot) for the Pre-Clock Initialization Code if (ME.GS.B.S_CURRENT_MODE != 2) { Post-Clock Initialization Code : { with this patch, i think that your test is PASSED ;-) Best regards Erwan |
|
|
|
|
|
|
|
我正在尝试使用gpios和UART的样本(参见附件)。我明白了
0x027F0 - > ''时钟失败'' ,即使我添加了前后行。 谢谢。 以上来自于谷歌翻译 以下为原文 I'm trying to do the same, together with the sample of gpios and UART (see attached file). I get 0x027F0 -> ''clock failure'' , even if I added the pre and post lines. Thank you. |
|
|
|
我认为我的问题是使用componentsInit()
以上来自于谷歌翻译 以下为原文 I think the problem in my case is the use of componentsInit() |
|
|
|
西蒙你好,
您是否尝试过我提供的补丁(上图)? (configuration.xml中) 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Simon , Did you try the patch that i have provided (above) ? (configuration.xml) Best regards Erwan |
|
|
|
是的,但是如果我添加组件初始化函数它不起作用。没有罚款。
以上来自于谷歌翻译 以下为原文 Yes, but it doesn't work if I add the components initialization function. Without is fine. |
|
|
|
|
|
|
|
西蒙,
我试图解决这个问题,因为我也在研究这个架构。显然,只有在DRUN模式下才能重新启动时钟。 所以你必须在清理FCCU之后放入componentsInit()以及从安全到DRUN的过渡。我附加了一些成功注入故障的代码,但它在从SAFE过渡到DRUN期间挂起,并从软件监视器重置。我不知道那里有什么问题,也许Wan35fr可能更有用。 以上来自于谷歌翻译 以下为原文 Simon, I tried to fix the problem, as I'm working on this architecture too. Apparently clock can be reinizializated only in DRUN mode. So you have to put componentsInit() after the cleaning of FCCU and the transition from safe to DRUN. I attached some code that successfully inject the fault but it hangs during the transition from SAFE to DRUN and it is reset from software watchdog. I don't know what's the problem there, maybe Wan35fr could be more useful. |
|
|
|
在这种情况下困扰我的另一件事是使用sdStart():在第一次运行时它工作但在复位后它会导致微控制器有一个未处理的异常,即使需要因为串行处于STOP状态。我无法理解原因。
以上来自于谷歌翻译 以下为原文 The other thing that troubles me in this case is the use of sdStart(): on the first run it works but after the reset it causes the microcontroller to have an unhandled exception, even if needed because the serial is in STOP state. I can't understand the reason. |
|
|
|
你好Stefano,
你可以找到链接到串口的MSC。 http://chibios.sourceforge.net/docs3/hal/group___s_e_r_i_a_l.html 你能检查你的PCTL(LINFLEX0)是否仍然设置好吗? 也许,你正在访问该地址。 你必须重新启用相关的PCTL。 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Stefano , you can find the MSC linked to the Serial port. http://chibios.sourceforge.net/docs3/hal/group___s_e_r_i_a_l.html Could you check if your PCTL (LINFLEX0) is still set ? maybe , you are accessing to the address. you have to reenable associated PCTL. Best regards Erwan |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
1224 浏览 1 评论
1849 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1499 浏览 1 评论
2729 浏览 6 评论
4966 浏览 21 评论
296浏览 4评论
344浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
263浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
343浏览 3评论
351浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-3-29 23:32 , Processed in 0.667088 second(s), Total 63, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 深圳华秋电子有限公司
电子发烧友 (电路图) 粤公网安备 44030402000349 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号