DA14681 Halts/Restarts while reading data from I2C EEPROM

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
mahmed106
Offline
Last seen: 1 month 2 weeks ago
Joined: 2019-05-03 17:28
DA14681 Halts/Restarts while reading data from I2C EEPROM

Hi Dialog 

We are working on a custom board based on DA14681 and sdk is 1.0.14. We are using an i2c based eeprom M24M02-A125 with DA14681. Single read write is fine but when i read data form flash in a loop very frequently, it stucks randomly. When i opened the debug it was stuck in file port.c and at this point. 

 

#if (dg_configIMAGE_SETUP == DEVELOPMENT_MODE)
                /* If the code stops at this point then the interrupts were enabled while they
                 * shouldn't be so.
                 */
                primask = __get_PRIMASK();
                ASSERT_WARNING(primask == 1);
#endif

 

I do not know what is the issue and which are the interrupts the code is talking about?

Device: 
PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi mahmed106,

Hi mahmed106,

This sounds like the scheduler is running, with interrupts disabled. Since the primask is 1, this means that you missed to enable interrupts. Additionally, are you using any of the sleep modes?

Thanks, PM_Dialog

mahmed106
Offline
Last seen: 1 month 2 weeks ago
Joined: 2019-05-03 17:28
I m using normal extended

I m using normal extended sleep mode. 

Which interrupts i missed, and how should i enable it . Because my code is running fine without eeprom read, Only when i attempt to read eeprom with sequential read then this issue occurs

PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi mahmed106,

Hi mahmed106,

Let me check it and I’ll get back to you. In the meanwhile, could you please probe the I2C lines and share a screenshot?

Thanks, PM_Dialog