Fix logging of interrupt events.
The system crashed if an interrupt occurs before the kernel event logger is initialized (Error seen on Galileo). This patch adds a condition to check if the logger is ready to operate. Change-Id: I27d7cc31f386780725b0c47a9c92e9c064fc128a Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
parent
9cb1e363f1
commit
c5d86e90a1
1 changed files with 5 additions and 0 deletions
|
@ -125,6 +125,11 @@ void _sys_k_event_logger_interrupt(void)
|
|||
{
|
||||
uint32_t data[2];
|
||||
|
||||
/* if the kernel event logger has not been initialized, we do nothing */
|
||||
if (sys_k_event_logger.ring_buf.buf == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
data[0] = sys_tick_get_32();
|
||||
data[1] = _sys_current_irq_key_get();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue