Re: How to use small I2C EEPROMs the NuttX way?

2021-04-30 Thread Frank-Christian Kruegel
Am 30.04.2021 um 15:06 schrieb Gregory Nutt: ... The main reason is that the AT24XX MTD driver only can handle one type of devices on a single bus. .. The is a deficiency in the driver and should be pretty easy to fix by passing the I2C address during driver initialization. Other drivers do

Re: How to use small I2C EEPROMs the NuttX way?

2021-04-29 Thread Frank-Christian Kruegel
Am 29.04.2021 um 20:43 schrieb Gregory Nutt: ... The main reason is that the AT24XX MTD driver only can handle one type of devices on a single bus. .. The is a deficiency in the driver and should be pretty easy to fix by passing the I2C address during driver initialization.  Other drivers do

Re: How to use small I2C EEPROMs the NuttX way?

2021-04-29 Thread Gregory Nutt
... The main reason is that the AT24XX MTD driver only can handle one type of devices on a single bus. .. The is a deficiency in the driver and should be pretty easy to fix by passing the I2C address during driver initialization.  Other drivers do that.

Re: How to use small I2C EEPROMs the NuttX way?

2021-04-29 Thread David S. Alessio
On Apr 29, 2021, at 10:12 AM, Frank-Christian Kruegel wrote: > > Am 29.04.2021 um 15:23 schrieb Gregory Nutt: >> There are several Microchip/Atmel boards that come with an Atmel MAC in >> AT24MAC402 EEPROM. You should be able to clone that logic (including >> setting the MAC address). See: >>

Re: How to use small I2C EEPROMs the NuttX way?

2021-04-29 Thread Frank-Christian Kruegel
Am 29.04.2021 um 15:23 schrieb Gregory Nutt: There are several Microchip/Atmel boards that come with an Atmel MAC in AT24MAC402 EEPROM.  You should be able to clone that logic (including setting the MAC address).  See: samv7/samv71-xult/src/sam_ethernet.c samv7/same70-xplained/src/sam_ethernet

Re: How to use small I2C EEPROMs the NuttX way?

2021-04-29 Thread Gregory Nutt
I assumed that the MAC is held in extended memory like the Atmel parts (otherwise, not much in the previous email makes sense). 183   /* Put the AT24 back in normal memory access mode */ 184 185   ret = at24->ioctl(at24, MTDIOC_EXTENDED, 0); 186   if (ret < 0) 187 {

Re: How to use small I2C EEPROMs the NuttX way?

2021-04-29 Thread Gregory Nutt
There are several Microchip/Atmel boards that come with an Atmel MAC in AT24MAC402 EEPROM.  You should be able to clone that logic (including setting the MAC address).  See: samv7/samv71-xult/src/sam_ethernet.c samv7/same70-xplained/src/sam_ethernet.c These keep the MAC address in the AT24MAC4

Re: How to use small I2C EEPROMs the NuttX way?

2021-04-29 Thread Alan Carvalho de Assis
Hi Frank-Christian, For small EEPROM you can use the EEPROM char driver directly, please take a look inside drivers/eeprom/ Then in your board side you just need to do something like this: finfo("Initialize I2C%d\n", AT24_I2C_BUS); i2c = sam_i2c_master_initialize(AT24_I2C_BUS); if (!

How to use small I2C EEPROMs the NuttX way?

2021-04-29 Thread Frank-Christian Kruegel
Hi. I'm currently porting NuttX to some proprietary compute modules with STM32F7 and STM32H7. Each and every board has got a small AT24MAC402 256 Byte EEPROM with additional UID and MAC address accessible under a second I2C address, and many boards have an additional AT24C256 32kB EEPROM. I'