MIMXRT1050 GPTimer can't access memory at address

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

MIMXRT1050 GPTimer can't access memory at address

1,412 Views
benolayinka
Contributor III

I'm trying to use the GPT in a project, but the register base address is inaccessible. Running the GPT example project crashes my board, and I have to use serial downloader mode to recover, which is painful.

This is the base address according to the manual and MIMXRT1052.h

/** Peripheral GPT2 base address */
#define GPT2_BASE (0x401F0000u)
/** Peripheral GPT2 base pointer */
#define GPT2 ((GPT_Type *)GPT2_BASE)

But when I step through the project, attempting to read memory at that location breaks the debugger and corrupts flash on the board Smiley Sad

Screen Shot 2019-07-31 at 13.47.43.png

Labels (1)
Tags (1)
0 Kudos
Reply
2 Replies

1,272 Views
TomE
Specialist II

That just happened to me. If you don't have the GPT clocks enabled in CCGR0 or CCGR1, that's what happens.

Sorry if this answer is a bit late.

Tom

 

0 Kudos
Reply

1,279 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Benjamin,

How are you trying to read the memory that corresponds to the GPT2? I didn't face any issue while accessing this memory region through the peripherals view on MCUXpresso IDE, see below image. I highly recommend you to check section12.8 of the MCUXpresso User guide to learn more about the peripherals view. 

pastedImage_1.png

About what you mentioned that you have to use serial downloader mode to recover your board after you flash the GPT example. This is due to the instruction __WFI. With this instruction, you are sending the RT to a low power state where only an interrupt can wake-up the core. This causes that the debugger cannot halt the core when trying to debug. To avoid this to happen, comment the else statement on the infinite loop, as shown on the image.


Have a great day,
TIC

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply