CubeMX Race condition
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-10-18 3:11 PM
Posted on October 19, 2015 at 00:11
The generated code initializes all peripherals and enables interrupts.
The application code's first hook is after peripheral initialization.How do I ensure that no interrupts before all high level peripherals are ready?Example:In the RTC IRQ handler I read data from a sensor.The sensor needs an initialization sequence before being operational.Too bad that the RTC interrupt is enabled *before* I can initialize the sensor.RTC-Interrupt orrurs, sensor not yet ready, crash.__disable_irq() / __enable_irq() is not an option because it blocks SysTick which the initialization code relies on.Off Course I can do ''IfSensorIsEnabled()'' in the RTC IRQ handler but why should I?IMHO this is another case of bad embedded software architecture in CubeMX./Osama
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
