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
已解决! 转到解答。
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
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
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
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