Thanks Alan – all my SPI pins are configured. That was easy to work out :)
I will follow this tomorrow and I’m sure it will all seem easier in the morning! From: Alan Carvalho de Assis <acas...@gmail.com> Reply to: <dev@nuttx.apache.org> Date: Tuesday, 24 August 2021 at 20:59 To: <dev@nuttx.apache.org> Subject: Re: SPI EEPROM Hi Tim, It is very straightforward, basically you will replace: FAR struct i2c_master_s *i2c; i2c = stm32_i2cbus_initialize(AT24_I2C_BUS); mtd = at24c_initialize(i2c); WITH: FAR struct spi_dev_s *spi; spi = sam_spibus_initialize(AT25_SPI_PORTNO); mtd = at25_initialize(spi); But of course, if you don't know how to configure the SPI pins (including the GPIO pin CS), nothing will work. For Atmel/Microchip SAMxx family SPI, I think boards/arm/samv7/samv71-xult/src/sam_st7789.c could be a good reference. BR, Alan On 8/24/21, Tim Hardisty <t...@jti.uk.com.invalid> wrote: AT24 is I2C and this is well supported in NuttX. AT25 is SPI and is what I have (AT25128) and it is not well supported, with no example code or boards that support it (that I can find) From: Gregory Nutt <spudan...@gmail.com> Reply to: <dev@nuttx.apache.org> Date: Tuesday, 24 August 2021 at 20:11 To: <dev@nuttx.apache.org> Subject: Re: SPI EEPROM That’s AT24 I2C not AT25 SPI EEPROM unfortunatel, and from a quick look it “just worked” ☹ There is support for the AT24 in other SAM boards. Search for AT24 in defconfigs, I find boards/arm/samv7/same70-xplained/ boards/arm/samv7/samv71-xult/ boards/arm/xmc4/xmc4500-relax There is even simulated AT24 support: boars/sim/sim/sim You should be able to duplicate the logic from the samv7 boards.