完善资料让更多小伙伴认识你,还能领取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个回答
|
|
|
在异常之前,在sdStart()中,ME_PCTL48(LINFLEX0)无论如何都设置为0x11。
但 linflexp-> LINCR1.R = 1; / * INIT位。 * / 0x00001FCE:48 10 SE_LI R0,0x1 0x00001FD0:B1 0F SE_STH R0,0x2(R31) 重置后仍会导致异常。 以上来自于谷歌翻译 以下为原文 Before the exception, in sdStart(), ME_PCTL48 (LINFLEX0) is anyway set to 0x11. But linflexp->LINCR1.R = 1; /* INIT bit. */ 0x00001FCE: 48 10 SE_LI R0,0x1 0x00001FD0: B1 0F SE_STH R0,0x2(R31) still causes the exception after the reset. |
|
|
|
|
|
你好Stefano,
在SAFE / DRUN模式下,默认情况下不启用LINFLEX0(PCTL)。 这就是为什么有中止的原因。 你应该在初始化一些IP之前创建一个进入RUN0模式的函数。 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Stefano , LINFLEX0 (PCTL) is not enabled by default in SAFE/DRUN mode. it is the reason why there is abort. you should create a function to go in RUN0 mode just before initializing some IPs. Best regards Erwan |
|
|
|
|
|
我不明白。在两种情况下,设备都使用hal_lld_init()进入RUN0。
以上来自于谷歌翻译 以下为原文 I don't understand. The device enters RUN0 with hal_lld_init() in both cases. |
|
|
|
|
|
我发现的唯一区别是在sdStart()中
ME.PCTL [n] .R = pctl; 0x00001B68:70 18 E3 FD E_LIS R0,0xC3FD 0x00001B6C:18 06 D1 C0 E_ORI R6,R0,0xC000 0x00001B70:C7 01 SE_LWZ R0,0x1C(R1) 0x00001B72:74 07 06 3F E_RLWINM R7,R0,0x0,0x18,0x1F 0x00001B76:C6 01 SE_LWZ R0,0x18(R1) 0x00001B78:04 60 SE_ADD R0,R6 0x00001B7A:18 00 80 C0 E_ADDI R0,R0,0xC0 0x00001B7E:01 06 SE_MR R6,R0 0x00001B80:90 76 SE_STB R7,0x0(R6) 在第一种情况下,在ME_PCTL48中设置0x11,然后调试器显示LINFLEX0的内容,而在第二种情况下,0x11被断言,调试器仍显示未知内容,就好像LINFLEX无论如何都没有时钟。我想我没有以正确的方式配置我需要的其他寄存器,但我找不到哪些。 以上来自于谷歌翻译 以下为原文 The only difference I've found is that in sdStart() ME.PCTL[n].R = pctl; 0x00001B68: 70 18 E3 FD E_LIS R0,0xC3FD 0x00001B6C: 18 06 D1 C0 E_ORI R6,R0,0xC000 0x00001B70: C7 01 SE_LWZ R0,0x1C(R1) 0x00001B72: 74 07 06 3F E_RLWINM R7,R0,0x0,0x18,0x1F 0x00001B76: C6 01 SE_LWZ R0,0x18(R1) 0x00001B78: 04 60 SE_ADD R0,R6 0x00001B7A: 18 00 80 C0 E_ADDI R0,R0,0xC0 0x00001B7E: 01 06 SE_MR R6,R0 0x00001B80: 90 76 SE_STB R7,0x0(R6) in the first case sets 0x11 in ME_PCTL48 and then the debugger shows the content of LINFLEX0, while in the second case 0x11 is asserted and the debugger still shows unknown content, as if LINFLEX is not clocked anyway or something. I think I'm not configuring in the right way some other register i need to, but I can't find which ones. |
|
|
|
|
|
你好Stefano,
我不清楚。 我已经复制了你的问题..时钟没有在安全模式下初始化。 实际上,SPC5-HAL并非设计为在严重故障后在安全模式下工作。 1)请删除 2)在hal_lld.c,main.c中添加以下代码(仅用于测试) (cf附件) 它在我身边工作.. 你必须强制过渡SAFE ==> DRUN ==> RUN0 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Stefano , i was not clear. i have reproduced your issue.. the clock was not initialized in SAFE mode. In fact, SPC5-HAL is not designed to work in SAFE Mode after Critical Fault. 1) Please Remove
2) Add this following code in hal_lld.c, main.c (it is just for test) (cf attachment) it is working in my side.. you have to force the transition SAFE ==> DRUN ==> RUN0 Best regards Erwan |
|
|
|
|
|
是的,现在它完美无缺。
非常感谢你。 以上来自于谷歌翻译 以下为原文 Yes, now it works perfectly. Thank you very much. |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1453 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1502 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3649 浏览 1 评论
3842 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2461 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
727浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
663浏览 5评论
710浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
941浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
745浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 10:11 , Processed in 1.085230 second(s), Total 53, Slave 46 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
8017