Oct 14, 2020
06:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 14, 2020
06:46 PM
IDE:AURIX DS Version: 1.2.0 Build id: 20200617-1233
Project:STM_Interrupt_1_KIT_TC275_LK
Board:TC275KIT
Debugger: infineon DAP miniwiggler
Timer Config code:
/* Function to initialize the STM */
void initSTM(void)
{
IfxStm_initCompareConfig(&g_STMConf); /* Initialize the configuration structure with default values */
g_STMConf.triggerPriority = ISR_PRIORITY_STM; /* Set the priority of the interrupt */
g_STMConf.typeOfService = IfxSrc_Tos_cpu0; /* Set the service provider for the interrupts */
g_STMConf.ticks = TIMER_INT_TIME; /* 500ms Set the number of ticks after which the timer triggers an
* interrupt for the first time */
IfxStm_initCompare(STM, &g_STMConf); /* Initialize the STM with the user configuration */
}
When debugging, the STM interrupt cycle is 38~40s. When the debugger is disconnected and the board is powered on again (not in debugging), everything is OK. The interrupt cycle is 500ms (check the cycle through LED). When debugging again, the interrupt cycle It's wrong again (38~42s)!
Project:STM_Interrupt_1_KIT_TC275_LK
Board:TC275KIT
Debugger: infineon DAP miniwiggler
Timer Config code:
/* Function to initialize the STM */
void initSTM(void)
{
IfxStm_initCompareConfig(&g_STMConf); /* Initialize the configuration structure with default values */
g_STMConf.triggerPriority = ISR_PRIORITY_STM; /* Set the priority of the interrupt */
g_STMConf.typeOfService = IfxSrc_Tos_cpu0; /* Set the service provider for the interrupts */
g_STMConf.ticks = TIMER_INT_TIME; /* 500ms Set the number of ticks after which the timer triggers an
* interrupt for the first time */
IfxStm_initCompare(STM, &g_STMConf); /* Initialize the STM with the user configuration */
}
When debugging, the STM interrupt cycle is 38~40s. When the debugger is disconnected and the board is powered on again (not in debugging), everything is OK. The interrupt cycle is 500ms (check the cycle through LED). When debugging again, the interrupt cycle It's wrong again (38~42s)!
- Tags:
- IFX
4 Replies
Oct 14, 2020
07:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 14, 2020
07:01 PM
question2: How to work with PLS+AURIX DS? Where is the plug-in for PLS for eclipse?
Oct 15, 2020
05:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 15, 2020
05:49 AM
snikeguo wrote:
When debugging, the STM interrupt cycle is 38~40s. When the debugger is disconnected and the board is powered on again (not in debugging), everything is OK. The interrupt cycle is 500ms (check the cycle through LED). When debugging again, the interrupt cycle It's wrong again (38~42s)!
The behavior you explain sounds like the STM timer continues to run when the CPU is halted. The counter then overruns, and you get the interrupt when the counter is back at the original value. You can add the STM as a suspend target to resolve the issue.
//STM suspend control
A STM0_OCS L 0x12000000
A STM1_OCS L 0x12000000
A STM2_OCS L 0x12000000
Oct 15, 2020
07:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 15, 2020
07:41 PM
felix.martin wrote:
The behavior you explain sounds like the STM timer continues to run when the CPU is halted. The counter then overruns, and you get the interrupt when the counter is back at the original value. You can add the STM as a suspend target to resolve the issue.
//STM suspend control
A STM0_OCS L 0x12000000
A STM1_OCS L 0x12000000
A STM2_OCS L 0x12000000
Where should I fill this code?
Oct 16, 2020
03:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 16, 2020
03:55 AM
You can add on beginning of your InitSTM function:
/* suspend by debugger enabled */
IfxStm_enableOcdsSuspend(STM);
/* suspend by debugger enabled */
IfxStm_enableOcdsSuspend(STM);