MDM-AP Status register reading while the PKE02Z64 device held in reset

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MDM-AP Status register reading while the PKE02Z64 device held in reset

跳至解决方案
4,724 次查看
guide19
Contributor II

Hi,

I am wondering if it is normal behaviour when the MDM-AP Status register is not possible to read while the PKE02Z64 device is held in reset.

I get only return value of MDM-AP status  0x00000000. Is this the correct situation?

Writing and reading of the MDM-AP Control is OK while in reset. 

After releasing reset, the MDM-AP Status return correct values.

BR,

Jozef

0 项奖励
回复
1 解答
2,954 次查看
pgo
Senior Contributor V

Hi Josef,

I had a look at this with FRDM-KE02 and FRDM MK20 boards using the USBDM TCL interpreter.  I got the following results:

For a FRDM-KE02

% stat

Found 1 devices

USBDM DLL Version = 4.10.6.100

BDM Version = HW=59, SW=4A

USBDM DLL Version = 4.10.6.100

BDM Version = HW=59, SW=4A

:setTarget ARM

:connect

With reset low

:pinSet 0x8

:rCreg r=0x1000000(MDM_AP.Status)->0x00000000

:rCreg r=0x1000004(MDM_AP.Control)->0x00000000

:rCreg r=0x10000FC(MDM_AP.Ident)->0x001C0020

With reset high

:pinSet 0x4

:rCreg r=0x1000000(MDM_AP.Status)->0x0001000A

:rCreg r=0x1000004(MDM_AP.Control)->0x00000000

:rCreg r=0x10000FC(MDM_AP.Ident)->0x001C0020

FRDM-MK20

% stat

Found 1 devices

USBDM DLL Version = 4.10.6.100

BDM Version = HW=59, SW=4A

USBDM DLL Version = 4.10.6.100

BDM Version = HW=59, SW=4A

:setTarget ARM

:connect

With reset low

:pinSet 0x8

:rCreg r=0x1000000(MDM_AP.Status)->0x00000032

:rCreg r=0x1000004(MDM_AP.Control)->0x00000000

:rCreg r=0x10000FC(MDM_AP.Ident)->0x001C0000

With reset high

:pinSet 0x4

:rCreg r=0x1000000(MDM_AP.Status)->0x0001003A

:rCreg r=0x1000004(MDM_AP.Control)->0x00000000

:rCreg r=0x10000FC(MDM_AP.Ident)->0x001C0000

1835008

This was using the following TCL script:

set ::status  0x01000000

set ::control 0x01000004

set ::idreg   0x010000FC

proc stat {} {

   openbdm

   settarget arm

   connect

   puts "With reset pin low"

   pinSet rst=0

   rcreg $::status

   rcreg $::control

   rcreg $::idreg

   puts "With reset pin 3-state"

   pinSet rst=3

   rcreg $::status

   rcreg $::control

   rcreg $::idreg

}

This would confirm your conclusion that the mdm-ap-status register reads zero when the device is being held in reset by the reset pin.  This is different from the MK20.

bye

在原帖中查看解决方案

0 项奖励
回复
9 回复数
2,955 次查看
pgo
Senior Contributor V

Hi Josef,

I had a look at this with FRDM-KE02 and FRDM MK20 boards using the USBDM TCL interpreter.  I got the following results:

For a FRDM-KE02

% stat

Found 1 devices

USBDM DLL Version = 4.10.6.100

BDM Version = HW=59, SW=4A

USBDM DLL Version = 4.10.6.100

BDM Version = HW=59, SW=4A

:setTarget ARM

:connect

With reset low

:pinSet 0x8

:rCreg r=0x1000000(MDM_AP.Status)->0x00000000

:rCreg r=0x1000004(MDM_AP.Control)->0x00000000

:rCreg r=0x10000FC(MDM_AP.Ident)->0x001C0020

With reset high

:pinSet 0x4

:rCreg r=0x1000000(MDM_AP.Status)->0x0001000A

:rCreg r=0x1000004(MDM_AP.Control)->0x00000000

:rCreg r=0x10000FC(MDM_AP.Ident)->0x001C0020

FRDM-MK20

% stat

Found 1 devices

USBDM DLL Version = 4.10.6.100

BDM Version = HW=59, SW=4A

USBDM DLL Version = 4.10.6.100

BDM Version = HW=59, SW=4A

:setTarget ARM

:connect

With reset low

:pinSet 0x8

:rCreg r=0x1000000(MDM_AP.Status)->0x00000032

:rCreg r=0x1000004(MDM_AP.Control)->0x00000000

:rCreg r=0x10000FC(MDM_AP.Ident)->0x001C0000

With reset high

:pinSet 0x4

:rCreg r=0x1000000(MDM_AP.Status)->0x0001003A

:rCreg r=0x1000004(MDM_AP.Control)->0x00000000

:rCreg r=0x10000FC(MDM_AP.Ident)->0x001C0000

1835008

This was using the following TCL script:

set ::status  0x01000000

set ::control 0x01000004

set ::idreg   0x010000FC

proc stat {} {

   openbdm

   settarget arm

   connect

   puts "With reset pin low"

   pinSet rst=0

   rcreg $::status

   rcreg $::control

   rcreg $::idreg

   puts "With reset pin 3-state"

   pinSet rst=3

   rcreg $::status

   rcreg $::control

   rcreg $::idreg

}

This would confirm your conclusion that the mdm-ap-status register reads zero when the device is being held in reset by the reset pin.  This is different from the MK20.

bye

0 项奖励
回复
2,954 次查看
guide19
Contributor II

Hi pgo,

thanks for your asnwer. It looks like the MDM-AP status register of the MKE device is not readable while in reset from some reason.

BR,

Jozef

0 项奖励
回复
2,954 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Jozef Prokopovic,

    Thank you for your question in our community! I'd like to serve you!

    Actually,MDM-AP status register can be read out when the device is held in reset.

  So, I think may be your read method is not right.

  If you use jlink debugger, Please do your operation according to the following script on jlink commander:

usb

h

r0 //system reset

swdwritedp 2, 0x01000000           //select MDM-AP

sleep 10

swdreadap 0

sleep 10

swdreadap 0 // read MDM-AP register 0

sleep 10

swdreadap 1

sleep 10

swdreadap 1 // read MDM-AP register 1

sleep 10

swdwritedp 2, 0x00000000           //select AHB-AP

r1 //system reset release

When you read the register, please read twice, I think you just not read it out .

Wish my answer will help you!

If you still have question, please let me know!

Best regards!

Jingjing

0 项奖励
回复
2,954 次查看
dry
Senior Contributor I

Hello,

Which hw debugger is this the script for?

Is this for MDM-AP or DAP?

0 项奖励
回复
2,954 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi D.RY,

   It is using the JLINK debugger.

Best Regards,

Kerry

0 项奖励
回复
2,954 次查看
dry
Senior Contributor I

Segger's Jlink?

Is that script for JLink commander? Sorry just dont' recognize the steps.  Also, is that the debug Access Port you accessing?

0 项奖励
回复
2,954 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi D.RY,

Yes, Segger's JLINK, then use the JLINK commander to type the according command, I use the debug to access it.You can try it on your side.

Best Regards,

Kerry

0 项奖励
回复
2,954 次查看
guide19
Contributor II

Hi Jingjing,

I think that the read method is OK at least for MKL devices, where can I read out the MDM-AP status even when the device is held in reset.

BR,

Jozef

0 项奖励
回复
2,954 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Jozef Prokopovic,

    I am sorry for my later reply!

    Actually,reading the MDM-AP status register of KE is different from other series chip, after communicate with our expert, their advice just like the following:

   If Pin reset hold 0, MDM-AP register can’t load from NVM or core in KE family. But you can try to generate system reset by MDM-AP Control register bit3. In this case, it’s ok to read MDM-AP Status register:

   Please do the following script on jlink commander:

usb

r

swdwritedp 2, 0x01000000           //select MDM-AP

sleep 10

swdreadap 0

sleep 10

swdreadap 0     

sleep 10

swdreadap 1

sleep 10

swdreadap 1

sleep 10

swdwriteap 1, 0x00000008           //generate system reset;

sleep 100

swdreadap 0

sleep 10

swdreadap 0                        //read MDM-AP reg0 in reset   =>0x03000052

sleep 10

swdreadap 1

sleep 10

swdreadap 1                        //read MDM-AP reg1     =>0x00000008

sleep 10

swdwriteap 1, 0x00000000             //release MDM system reset quest

sleep 100

swdreadap 0

sleep 10

swdreadap 0

sleep 10

swdreadap 1

sleep 10

swdreadap 1

sleep 10

swdwritedp 2, 0x00000000           //select AHB-AP

r

After do like that, you can read the MDM-AP status register out.

I  wish it helps you!

Best regards!

Jingjing

0 项奖励
回复