Debugger error: Cannot find MEM-AP selected by core index

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Debugger error: Cannot find MEM-AP selected by core index

3,286件の閲覧回数
Maciek
Contributor V

Hi,

I have created simple project from scratch on i.MXRT1064 EVK. To test GPIO and PIT drivers from SDK and to switch off most of the peripheral clocks. 
However after checking 'Run PIT in debug mode' in Peripheral Config Tool (PIT configuration) - when I was trying to debug I've got error messages from debugger:
"chip initialization failed - Ep(08). Cannot access core regs when target running"

After that I can no longer debug any project on EVK. After restarting MCUXpresso and reconnecting EVK to PC I've got error messages that are visible in the attached screenshot. After that when trying to debug I get "0 available SWD Devices detected".

How to regain debugger control over the EVK ?

UPDATE: I can recover from this by simply reflashing any demo app using serial downloader mode on EVK. But I'm running into this problem repeatedly. I'm clearing interrupt flag in the ISR and use __DBS command after that. And then I can successfully debug my application one single time (everything works) - after that any subsequent debug session ends with "chip initialization failed - Ep(08). Cannot access core regs when target running". The exact message that ends the debug session is:

Opening flash driver MIMXRT1064.cfx
Sending VECTRESET to run flash driver
state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Wait in DAP access
state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Wait in DAP access
Warning - processor did not halt - gave up waiting
target failed to halt after flash driver reset - (null)
After error Nn(05). Wire ACK Wait in DAP access -
Failed to read address register in DAP - Nn(05). Wire ACK Wait in DAP access
Driver memory check after reset - mem not working after mailbox read - Em(17). Debug port inaccessible after access at location 0x2000A778
flash start - disabling IRQs failed - rc Ep(08). Cannot access core regs when target running.
chip initialization failed - Ep(08). Cannot access core regs when target running.
failed to initialize flash driver MIMXRT1064.cfx
error closing down debug session - Nn(05). Wire ACK Wait in DAP access

What can be the problem here ? What to look for ?

Thanks
Maciek

0 件の賞賛
返信
2 返答(返信)

3,265件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Maciek 

  Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

  It's better to share some code snap about your issues, eg, which code will caused the issues, then which code will not.

You mentioned call to GPIO_PortToggle() inside the ISR for PIT timer will meet issues, please tell us which GPIO you are controlling? SWD related interface or the BOOT_MOD related pins?

  Do you try to control the led pins, whether that still have issues.

  From your description, your issue mainly related to your own project, can you add some code on the SDK PIT? Whether that SDK project will meet issues or not, the GPIO just use the on board LED pin.

 

Any updated information, kindly let me know.

Best Regards,

kerry

0 件の賞賛
返信

3,270件の閲覧回数
Maciek
Contributor V

Hi,

the reason for this debugger error was the call to GPIO_PortToggle() inside the ISR for PIT timer. After moving the call to main() problem disappears.

Can anyone tell why this call inside ISR results in such debugger bahavior ?

Thanks

Maciek

0 件の賞賛
返信