Q3. Using IAP_ReadEEPROMPage and EEPROM_WritePage

cancel
Showing results for 
Search instead for 
Did you mean: 

Q3. Using IAP_ReadEEPROMPage and EEPROM_WritePage

369 Views
gmk1
Contributor III

Whenever the program encounters the above functions during execution, some of the LEDs & relays connected with GPIOs glow/toggle for a certain period of time and then turn-off automatically.
Why this is happening?

I'm storing 3 uint32_t data into eeprom which is working fine but why GPIOs are toggling.

Labels (4)
0 Kudos
7 Replies

271 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gmk 9,

Which LEDs do yo meaning?

Do you use a demo board ? If yes, you can check the Schematic.

BR

Alice

0 Kudos

271 Views
gmk1
Contributor III

Hi Alice_Yang

Not a demo board. Its a custom design. I have couple of GPIOs connected to leds and relays, all configured as active high. 

Whenever a function related to eeprom write/read is encountered, these GPIOs turn off for 1 second and turn on again.

This is strange behaviour. 

What could be happening?

0 Kudos

271 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gmk,

Could you please show the part of schematic about connecting LEDs & relays.

show which pins connected to them.

BR

Alice

0 Kudos

271 Views
gmk1
Contributor III

x.JPGz.JPGy.JPG

1st image Relay connection where PFC1 & PFC2 are controller GPIOs.

3rd image shows Led connections with controller GPIOs

2nd image shows Led Nets are extended to other board

0 Kudos

271 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gmk9,

How do you config the GPIOs that connect to LED?

How about  try the simple demo iap_eeprom under SDK package?

0 Kudos

271 Views
gmk1
Contributor III

Hi Alice, 

This is my GPIO configuration code

void alarm_fb_gpio_init(void)
{
IOCON->PIO[3][4]= 0x00000120; 
IOCON->PIO[3][5]= 0x00000120; // Mains out of range
IOCON->PIO[3][6]= 0x00000120; // Emergency push button
IOCON->PIO[3][7]= 0x00000120; // Mains fail
IOCON->PIO[3][8]= 0x00000120; 
IOCON->PIO[3][9]= 0x00000120; 
IOCON->PIO[3][10]= 0x00000120; 
IOCON->PIO[3][11]= 0x00000120; // Backdoor-1 open
IOCON->PIO[3][12]= 0x00000120; // Backdoor-2 open
IOCON->PIO[3][14]= 0x00000120; // Spare-1
IOCON->PIO[3][15]= 0x00000120; // Spare-2

// Set as input pins
GPIO->DIRCLR[3] |= (1<<4) | (1<<5) | (1<<6) | (1<<7) \
| (1<<8) | (1<<9) | (1<<10)| (1<<11)\
| (1<<12)| (1<<14)| (1<<15);

CLOCK_EnableClock(kCLOCK_Gpio5);

// GPIO for Doors open buzzer indication
IOCON->PIO[5][0]= 0x00000120;
// Set as output pin
GPIO->DIR[5] |= (1<<0);

// GPIO for Doors open buzzer indication
IOCON->PIO[5][1]= 0x00000120;
// Set as output pin
GPIO->DIR[5] |= (1<<1);
}

I didn't check with demo. I'll check.

0 Kudos

271 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gmk9,

How about your this case now?

Please contact me without any hesitate if still have question.

Regards,

Alice

0 Kudos