Part Number: TMDSCSK8127
I work with TMDSCSK8127 board and use IPNC-RDK-CSK (3_9_1)
I need to change and read PLLSS (and any other) register values from the terminal
As I understand, linux_prcm_ipcam work with registers using the WR_MEM_32(addr, data) to directly write into register
and RD_MEM_32(addr) to directly read from register
I added the next code that lets me choose an adress for read/write register operation
to /ipnc_rdk-3.9.1/Source/ipnc_rdk/ipnc_app/utils/prcm_app/linux_prcm_ipcam
-----------------------------------
if(0==strcmp(argv[1],"rd")) //read reg value operation
{
if(argc>2)
{
RD_MEM_32((int)strtol(argv[2],NULL,16));
}
}
else
if(0==strcmp(argv[1],"wr")) //write reg value operation
{
if(argc>3)
{
int reg=(int)strtol(argv[2],NULL,16);
int val=(int)strtol(argv[3],NULL,16);
printf("WRITE reg %p val %p \n",reg,val);
WR_MEM_32(reg, val);
RD_MEM_32(reg); //look a result of write reg operation
}
}
else
switch (argv[1][0]) {
------------------------------------
I run it on target from terminal.
I test it on 0x48180D10 RM_ISP_RSTCTRL register:
read the reg value,then write other value to the reg address,
read the reg value again and find that
write operation at this reg was succesful:
------------------------------------------------------------------------------------------------------------
root@ti81xx:/opt/ipnc# ./linux_prcm_ipcam rd 0x48180D10
/dev/mem opened.
Phy Addr : 0x48180d10 Data : 0x00000007
root@ti81xx:/opt/ipnc# ./linux_prcm_ipcam wr 0x48180D10 3
/dev/mem opened.
WRITE reg 0x48180d10 val 0x3
Phy Addr : 0x48180d10 Data : 0x00000003
------------------------------------------------------------------------------------------------------------
Than, after reboot, I tried to implement the steps to re-configurethe VIDEO1PLL
e2e.ti.com/.../1161204
using "/linux_prcm_ipcam wr" from terminal:
1. write VIDEO1PLL_CLKCTRL[23] IDLE = 1 //thus you start transition from locked/active to bypass/idle mode
PLLSS Peripheral Registers base address: 0x481C_5000 (Table 3-6 of TMS320DM8127 DaVinci Video Processors datasheet (Rev.C))
VIDEO1PLL_CLKCTRL offset: 1D4h (Table 2-42 MS320DM814x DaVinci Digital Media Processors Technical Reference Manual (SPRUGZ8))
------------------------------------------------------------------------------------------------------------
root@ti81xx:/opt/ipnc# ./linux_prcm_ipcam rd 0x481C51D4
Phy Addr : 0x481c51d4 Data : 0x08910811
------------------------------------------------------------------------------------------------------------
So, VIDEO1PLL_CLKCTRL[23] IDLE = 1
2. wait while VIDEO1PLL_STATUS[8] BYPASSACK == 1 and VIDEO1PLL_STATUS[0] BYPASS == 1
VIDEO1PLL_CLKCTRL offset: 1F4h
------------------------------------------------------------------------------------------------------------
root@ti81xx:/opt/ipnc# ./linux_prcm_ipcam rd 0x481C51F4
Phy Addr : 0x481c51f4 Data : 0xe0000161
------------------------------------------------------------------------------------------------------------
So, IDEO1PLL_STATUS[8] BYPASSACK == 1 and VIDEO1PLL_STATUS[0] BYPASS == 1
3. clear bit VIDEO1PLL_CLKCTRL[0] TINITZ = 0
------------------------------------------------------------------------------------------------------------
root@ti81xx:/opt/ipnc# ./linux_prcm_ipcam wr 0x481C51D4 0x08910810
/dev/mem opened.
WRITE reg 0x481c51d4 val 0x8910810
Phy Addr : 0x481c51d4 Data : 0x08910811
------------------------------------------------------------------------------------------------------------
So, I tried to change value of IDEO1PLL_STATUS reg and it failed, value does not changed.
How should I work with PLLSS memory-mapped registers to change their value?
Can I work from linux_prcm_ipcam with any memory-mapped register?