Sunday, February 18th 2018, 9:57am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

hilamiranda

Beginner

Date of registration: Feb 26th 2008

Posts: 30

Location: Israel

1

Tuesday, April 29th 2014, 12:40pm

Does JLink SDK support WFi WFE commands?

Hello,

We use JLink SDK for automatic interface for M4, M0 and A9.
Does JLink SDK support execution f WFI and WFE commands thus enable wait?

Thanks in Advance

Hila

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

2

Wednesday, May 7th 2014, 9:44am

Hi Hila,

What exactly are you looking for?
The WFI and WFE are core instructions. They have nothing to do with the J-Link API...
If your target application makes use of these instructions, it depends on the device you are using, if you are able to debug the device when using them
because it depends on what clocks are turned off while a WFI / WFE is active.
On the STM32F0 / F1 / F2 / F4 / L series devices, I know it is supported because the relevant clocks for debugging are not turned off.


Best regards
Alex

hilamiranda

Beginner

Date of registration: Feb 26th 2008

Posts: 30

Location: Israel

3

Thursday, May 8th 2014, 11:23am

Hello Alex,


Sorry for the delay, we were on Holiday for several days.


I'm afraid I was not clear enough.


Our task is to validate a product which is based on an IP of ARM M4, M0 or A9 (dual core).
We use the Segger Jlink DLL to configure and read registers or memory and to operate various HW modules thru USB while executing FW on the product.
So far we never ran into an operation we wanted to perform thru the DLL but was missing from the SDK.

As part of the validation we measure power consumption. For that purpose we need the WFI/WFE
One option is to run a dedicated FW which "listens" to a pipe in memory and performs WFI/WFE from the core side. However it means that we cannot run the test using our production FW.

Does the SDK include any wrapping for these commands?

Many Thanks,

Hila

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

4

Thursday, May 8th 2014, 2:15pm

Hi Hila,

I still do not understand what you are looking for....

Quoted

We use the Segger Jlink DLL to configure and read registers or memory and to operate various HW modules thru USB while executing FW on the product.

Does this mean, you use J-Link, to download a certain firmware on the target, then set the PC (program counter)
to the start of the firmware and execute it. This firmware will then perform some tests.
???

Quoted

As part of the validation we measure power consumption. For that purpose we need the WFI/WFE
One option is to run a dedicated FW which "listens" to a pipe in memory and performs WFI/WFE from the core side. However it means that we cannot run the test using our production FW.

To execute an WFI/WFE, the CPU needs to perform a WFI/WFE.
So you will need an application that enters WFI/WFE state, in any case.
It is not possible to force a WFI/WFE by setting some magic registers via JTAG etc. if this is what you are looking for...

What you can do:
Generate a small application (basically it is just 2 instructions...) that just performs:
__asm("WFI");
do {} while (1);

Download this into RAM, set the PC to the start of this application and let the CPU run.
It will then enter the low power mode.
But not sure what else expect the WFI/WFE you need to perform, since I do not have any information about your test setup

Hope it helps anyhow...


- Alex

hilamiranda

Beginner

Date of registration: Feb 26th 2008

Posts: 30

Location: Israel

5

Monday, May 12th 2014, 7:14pm

Hi Alex,

Thanks.. I'm afraid the solution of writing a FW to do the WFI is not quite what we wanted because we were interested in testing power consumption while our commercial FW is running..

I guess it's just not supported.

Better luck for us next time.
^^


Many Thanks!

Hila