Is it possible to read CPU register value at runtime?

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

Is it possible to read CPU register value at runtime?

1,274 Views
chandola
Contributor I

I want to read the value of DCFG_RSTRQSR1 CPU register for P2040 CPU while running specific appilcation. Codewarrior user manual specifies that one can read CPU register while debugging. However executable cannot be debugged on P2040 CPU. Hence I want to know is it possible to read DCFG_RSTRQSR1 register while the application executes in normal mode.

Edit:

As per RCW switch position device is supposed to start from NAND flash. There it first executes uboot from NAND flash. uboot then loads linux. Currently it is not even able to execute uboot. After boot up Processor asserts RESET_REQ_B for which CPLD issues HRST to the processor. This keeps on happening in loop and device keeps rebooting itself infinitely. During previous discussion with nxp it was found this processor can assert RESET_REQ_B because of several reasons. The exact reason is stored in CPU register DCFG_RSTRQSR1. However this issue comes up only when RCW switch position are set to boot from NAND flash. In this situation(while booting from NAND) it is not possible to debug an application and view CPU register values. It is possible to debug application(via codewarrior) in case of default switch position(NOR flash) but in that case device doesn't reboot and DCFG_RSTRQSR1 value remain as 0(as if no error occurred).

2 Replies

750 Views
chandola
Contributor I

Thanks for reply Pavel,

We found solution for the problem. One can disable RESET_REQ_B pin, and use codewarrior connection server to get value of desired register. It helped in debugging and problem was solved. It turned out that PBL got corrupted which was causing processor to assert RESET_REQ_B request.

0 Kudos
Reply

750 Views
Pavel
NXP Employee
NXP Employee

NXP CodeWarrior for the QorIQ supports u-boot debugging.

Look at the Sections 7.5 and 7.6 of the " Targeting_PA_Processors.pdf" file. This file is available using the following path:

\Freescale\CW_PA_v10.5.1\PA\Help\PDF

 

This CodeWarrior also supports attach possibility. Use this possibility for reading the DCFG_RSTRQSR1 register.


Have a great day,
Pavel Chubakov

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