关于lpc43xx core_rst

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

关于lpc43xx core_rst

1,755 Views
cyc583723081
Contributor I

使用lpc4333遇到了芯片不能软重启的问题,根据lpc43xx的用户手册和勘误手册了解到,要重置整个芯片只能使用core_rst, 调用NVIC_SystemReset()是没用的,并且 MASTER_RST , PERIPH_RST , M4_RST
这些都是没效的。我按照手册操作了复位生成单元中的复位控制寄存器0(LPC_RGU->RESET_CTRL[0] = 0;),实测发现这种操作并不能产生复位,而导致系统死机。我想知道的是能够通过软件产生core_rst吗?  如果不能是不是只能通过看门狗来产生core_rst  ???pastedImage_1.png

, 

0 Kudos
Reply
5 Replies

1,634 Views
jeremyzhou
NXP Employee
NXP Employee

Hi ,

非常感谢使用NXP产品,很高兴为你提供技术支持!

请使用LPC4337的LPCOpen library 里的Chip_RGU_TriggerReset函数触发Core_rst,调用细节请参考LPCOpen library中的代码,please give a try.

/**
 * @brief    Trigger a peripheral reset for the selected peripheral
 * @param    ResetNumber    : Peripheral reset number to trigger
 * @return    Nothing
 */
STATIC INLINE void Chip_RGU_TriggerReset(CHIP_RGU_RST_T ResetNumber)
{
    LPC_RGU->RESET_CTRL[ResetNumber >> 5] = 1 << (ResetNumber & 31);
    /* Reset will auto clear after 1 clock cycle */
}‍‍‍‍‍‍‍‍‍‍


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

1,634 Views
cyc583723081
Contributor I

感谢您的回复,我调用了这个函数,但是芯片还是没能重启,我的lpc芯片有和另外一片fpga芯片引脚互联,我发现,只要我的fpga芯片不工作,调用lpc的复位函数,可以使lpc芯片重启,但是只要我的fpga芯片工作了,lpc这边调用复位函数,它就不能重启,而是死机,难道lpc在调用Chip_RGU_TriggerReset时,芯片能否复位成功还和它引脚上的电平有关系吗? 另外,这个函数的调用,产生的芯片重启过程和芯片上电启动的过程一样吗?

0 Kudos
Reply

1,634 Views
jeremyzhou
NXP Employee
NXP Employee

Hi ,

感谢你的回复。
从你描述看,好像是FPGA干扰了Chip_RGU_TriggerReset的作用,我建议分享FPGA是怎么和LPC4337互联的,还有就是它们协同工作的场景是怎样,请介绍一下。
我猜测是Chip_RGU_TriggerReset还是起作用了的,但是FPGA干扰了MCU重启的过程,你可以按照这个思路测试验证一下。
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

1,634 Views
cyc583723081
Contributor I

hi,您好。

感谢您的及时回复。

目前我的fpga和lpc是通过emc接口相连的,还有一些io相连。工作的模式我简单介绍一下:

fpga内部有一个sram,会存储数据,当数据量达到一定的时候,FPGA这边会通过io电平去通知lpc,lpc这边会配置io中断,比如下降沿中断,lpc就会通过emc接口去fpga那边去拿数据,一直这样循环。大概就是这样一个过程。我会在附件中分享一下我的设计原理图。目前可以肯定的是fpga与lpc互联的引脚中,有一个或者多个引脚的电平会对lpc的Chip_RGU_TriggerReset复位产生影响。今早我已做测试,在调用Chip_RGU_TriggerReset前,我将fpga恢复到工作状态之前,然后再调用Chip_RGU_TriggerReset,是成功的。

感谢!!!

0 Kudos
Reply

1,634 Views
jeremyzhou
NXP Employee
NXP Employee

Hi ,

感谢你的回复。

在浏览你的原理图后,我有点怀疑P2.7(EMC_A9)在默认情况是作为ISP pin,如果这时候外接低电平的话,会让MCU 进入到ISP 模式的,你可以在板子测试验证一下。
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply