blhost and sdphost usage with GPT timers

cancel
Showing results for 
Search instead for 
Did you mean: 

blhost and sdphost usage with GPT timers

173 Views
Contributor II

Hello,

I am using blhost and sdphost to load bin and execute a program on EVK1050 board.

To use blhost and sdphost I don't execute "BOARD_BootClockRUN" function, as a result, I cannot use GPT timers in the programs because they are not initialized. 

Anybody has an idea how to solve this issue?

I cannot configure clocks because blhost and sdphost go out of sync.

Thank you.

Labels (1)
0 Kudos
5 Replies

105 Views
Contributor II

I found that these lines are required to initialize the GPT timer if don't execute "BOARD_BootClockRUN"


/* Set XTAL 24MHz clock frequency. */
CLOCK_SetXtalFreq(24000000U);
/* Set IPG_PODF. */
CLOCK_SetDiv(kCLOCK_IpgDiv, 3);

 

Thank you very much for your help

0 Kudos

125 Views
Specialist V

Hi

I don't fully understand the issue but will focus on this line:

"I cannot use GPT timers in the programs because they are not initialized. "

The GPT timers are clocked by the PER_CLK_ROOT (same as PITs) which defaults to being from the 24MHz oscillator input (or IP_CLK_ROOT if switched by some other configuration), and so will be available.
To use the GPTs their clock gates must however be set (in CCM_CCGR0 or CCM_CCGR1, depending on the GPT instance), after which they can be normally accessed.
After the access their counter clock input can be selected from a number of sources so you will presumably be able to find something suitable there without needing to change and clock configurations.

Regards

Mark
uTasker project developer for Kinetis and i.MX RT]
I can be contacted by personal message or on the uTasker web site to discuss professional training or product development requirements, to accelerate progress or to solve technical problems

 

 

160 Views
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
According to your statement, the blhost and sdphost tools will fail to program the bin of the demo project which contains the BOARD_BootClockRUN function, is it right?
However, on my side, I've not encountered this similar issue.

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.
-------------------------------------------------------------------------------

147 Views
Contributor II

Hi Jeremy,

I will explain the order of operations

With blhost my program is loaded to RAM and I use a shared memory area to activate certain functions. This is the order:

1. Load bootloader with sdphost and execute

2. Load program.bin to RAM with blhost

3. Within the program.bin "BOARD_BootClockRUN" is executed.

4. Communication with the program is through a shared memory area. if "BOARD_BootClockRUN" is executed, communication fails.

 

Also, this quote is from the blhost application note " Do not modify any pin mux or clock settings used by bootloader peripherals" 

0 Kudos

136 Views
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your reply.
After reviewing your explanation, I'm still not very clear about your issue, so can you clarify below inquires?
1) The Blhost tool will load an application image to a RAM, then I'd like to know what the address rang of this RAM area,
2) In addition, please introduce what the RAM area the flashloader resides in too.
3) Does the sentence ''Within the program.bin "BOARD_BootClockRUN" is executed.'' mean this program will be executed after jumping from the flash loader?
4) Please explain more details about the communication with the program.

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.
-------------------------------------------------------------------------------