Skip to content

[STM32XX] Fix timer interrupt handler #2093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 19, 2016
Merged

Conversation

svastm
Copy link
Contributor

@svastm svastm commented Jul 4, 2016

Some of the targets use only the flag and some other only the interrupt source to check which channel of the master timer has triggered an interrupt in an interrupt handler.

The flag can be set by hardware even if the interrupt is disable and two interrupt can be enable, for one triggered, in the same handler so we need a double check here.

The major issue is that some interrupt_x handler code can be execute even if the interrupt_x have been disable.


These commits make all of the st targets checking both int source and flag for the master timer.


Please merge this after these ones, I will rebase:

@@ -77,7 +82,7 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) {
// Configure time base
TimMasterHandle.Instance = TIM_MST;
TimMasterHandle.Init.Period = 0xFFFFFFFF;
TimMasterHandle.Init.Prescaler = (uint32_t)(SystemCoreClock / 1000000) - 1; // 1 �s tick
TimMasterHandle.Init.Prescaler = (uint32_t)(SystemCoreClock / 1000000) - 1; // 1 �s tick
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use ascii character? 1 us tick or microsecond might be even better?

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 5, 2016

Is this ready to be merged? Both PR referenced here were integrated

@svastm svastm force-pushed the fix_int_handler branch from c305bef to be1efa4 Compare July 5, 2016 08:04
@svastm
Copy link
Contributor Author

svastm commented Jul 5, 2016

Rebase done and ready to merge.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 5, 2016

@mbed-bot: TEST

HOST_OSES=windows
BUILD_TOOLCHAINS=ARM,GCC_ARM,IAR
TARGETS=ALL

@mbed-bot
Copy link

mbed-bot commented Jul 5, 2016

[Build 579]
FAILURE: Something went wrong when building and testing.

@sandeepach
Copy link

I am getting stuck in while(1) loop in RTC_Alarm_IRQHandler while using Ethernet on STM32F746G Discovery board. Could it be related?

@svastm
Copy link
Contributor Author

svastm commented Jul 11, 2016

The fix concern only the timer irq. To me, it can't be related.

@0xc0170 0xc0170 merged commit be1efa4 into ARMmbed:master Jul 19, 2016
@0xc0170
Copy link
Contributor

0xc0170 commented Jul 19, 2016

manually merged

@svastm svastm deleted the fix_int_handler branch July 29, 2016 09:42
@cmonr cmonr removed the needs: CI label Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants