Wednesday, October 18th 2017, 6:27pm UTC+2

You are not logged in.

  • Login
  • Register

Reply

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.

Message information
Message
Settings
Automatically converts internet addresses into links by adding [url] and [/url] around them.
Smiley code in your message such as :) is automatically displayed as image.
You can use BBCode to format your message, if this option is enabled.
Security measure

Please enter the letters that are shown in the picture below (without spaces, and upper or lower case can be used).

The last 6 posts

Friday, October 13th 2017, 9:23am

by SEGGER - Johannes

Hi,

SEGGER_SYSVIEW_X_GetTimestamp() will be called in the recording function called by SEGGER_SYSVIEW_Record*().
You do not have to modify them.

If the recording shows only one cycle, make sure that the implementation of SEGGER_SYSVIEW_X_GetTimestamp() does work.
Refer to the sample configurations given for the various supported systems.

Regards
Johannes

Wednesday, October 11th 2017, 12:11pm

by smoothie0000

Hi,

Thanks, it works! But it still has a problem: it cannot get how many ticks the interrupt runs, which means even if I ran the interrupt for several seconds, it shows only one cycle. I cannot find SEGGER_SYSVIEW_X_GetTimestamp() function called in SEGGER_SYSVIEW_RecordEnterISR(); and SEGGER_SYSVIEW_RecordExitISR();. Do I need to manually do something in the interrupt?


Thanks for help!

Wednesday, October 11th 2017, 11:33am

by SEGGER - Johannes

Hi,

Keil does not support extended assembler syntax.

Instead you can use something like this:

C/C++ Source code

1
2
3
4
U32 SEGGER_SYSVIEW_X_GetInterruptId(void) {
  register U32  IPSR __asm("ipsr");
  return(IPSR);
}


Regards
Johannes

Tuesday, October 10th 2017, 2:19pm

by smoothie0000

Hi,

I get the same problem, I am using STM32F091RC nucleo board, and as interrupt ID is not detected so interrupt handler is recognized as an idle state.

I tried the __asm volatile ("mrs %0, ipsr" : "=r" (Id) );


solution mentioned above, but get a compilation error: missing ")" character. I am using Keil5 with default compilation settings.


Could you please tell me how you solved this problem?


Thanks!

Monday, October 9th 2017, 1:34pm

by SEGGER - Johannes

Hi,

You are right, Cortex-M0+ devices do not have the ICSR[VECTACTIVE] bits implemented.
Instead you can read the active vector from the IPSR, best implemented in a user-provided function SEGGER_SYSVIEW_X_GetInterruptId():

C/C++ Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*********************************************************************
*
*       SEGGER_SYSVIEW_X_GetInterruptId()
*
* Function description
*   Return the currently active interrupt Id,
*   which ist the active vector taken from IPSR[5:0].
*
* Return value
*   The current currently active interrupt Id.
*
* Additional information
*   This function is not used by default, as the active vector can be 
*   read from ICSR instead on Cortex-M0.
*   For Cortex-M0+ devices, change SEGGER_SYSVIEW_GET_INTERRUPT_ID
*   in SEGGER_SYSVIEW_Conf.h to call this function instead.
*/
U32 SEGGER_SYSVIEW_X_GetInterruptId(void) {
  U32 Id;

  __asm volatile ("mrs %0, ipsr"
                  : "=r" (Id)
                  );
  Id &= 0x3F;

  return Id;
}


Regards
Johannes

Friday, August 4th 2017, 3:32pm

by TillmannK

Cortex M0+ NoOS Port Read Active Interrupt ID

Hello
Im trying to port SystemView to the Coretex M0+ uC.

I could send Task Info and Print to the SystemView Terminal but i have Problems to monitor the Interrupts.


According to:
http://infocenter.arm.com/help/index.jsp…b/CIHFDJCA.html
4.3.3 Interrupt Control and State Register
The VECTACTIVE Part of the ICSR Register is marked as Reserved.

C/C++ Source code

1
SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32 *)(0xE000ED04)) & 0x3F)

Makro Returns 0 i think.

If i try to use the SystemView Interupt Functions:

C/C++ Source code

1
2
SEGGER_SYSVIEW_RecordEnterISR();
SEGGER_SYSVIEW_RecordExitISR();


I got al lot of ISR Enter and ISR Exit Events in the Segger Systemview PC Tool (see the Attachment).

Do you have any suggestions how i could fix this?
TillmannK has attached the following image:
  • SystemView_M0_IRQ_ID_Error.png