I have 3 different SAMA5D2 eval board and have used them for years. I have had my custom board running “bare metal” code based on the Atmel code with no problems. Everything works, including the many many custom device on the board. I can swim. Using Lvgl too.
I made the decision to move to NuttX as I hoped it would make it easier to write the final app as I need USB host, USB device, and a file system. It feels, right now, like it was a bad move as the documentation is seemingly incomplete. There is no point me getting yet another eval board just to prove that boards that are already supported work. Or should work - the SAMA5 eval boards are “supported” but are full of errors (e.g. flexcom is based on SAMA5D3 which is different; SAMA5D2 has MCAN but the D3 has CAN and needs a completely different driver; and so on. PRs to follow!!). As I have found, even basic devices such as nor flash or SPI EEPROM have only minimal support and, more importantly, no documentation that’s worth using. I will just have to keep struggling, googling, grepping, and hoping to hit lucky. I will add to the documentation once I have it working. If I get it working. And this is not aimed at you, Alan, as I know you are trying hard to help. From: Alan Carvalho de Assis <acas...@gmail.com> Reply to: <dev@nuttx.apache.org> Date: Tuesday, 24 August 2021 at 19:42 To: <dev@nuttx.apache.org> Subject: Re: SPI EEPROM Hi Tim, The process to get AT25 SPI is similar, but for SPI you need to get the CS pin configure besides the other four SPI pins. Is this your first time using SPI on NuttX? There are some tutorials at NuttX Channel explaining how to use SPI on NuttX, like using SDCard over SPI. I suggest you to start with a board that has everything in place already, like the STM32F4Discovery or BluePill (stm32f103-minimum). Also the guys from MicroROS wrote a more technical tutorial about how SPI works on NuttX: https://github.com/micro-ROS/NuttX/issues/29 There is not theoretical class of swimming, you need to enter in the water, just start in the shallow place: stm32 + sdcard spi for example. BR, Alan On 8/24/21, Tim Hardisty <t...@jti.uk.com.invalid> wrote: That’s AT24 I2C not AT25 SPI EEPROM unfortunatel, and from a quick look it “just worked” ☹ From: Alan Carvalho de Assis <acas...@gmail.com> Reply to: <dev@nuttx.apache.org> Date: Tuesday, 24 August 2021 at 18:01 To: <dev@nuttx.apache.org> Subject: Re: SPI EEPROM Hi Tim, You are right, Documentation is one of our "Achilles tendon". But, of course, some times it is also the user search fault, maybe they don't have the Google-fun skills yet (please don't take it as personal). If you search for NuttX EEPROM Tutorial It will returns this tutorial: https://www.youtube.com/watch?v=qzjf2JtgYN0 Please get us to improve this situation, write a tutorial at: nuttx/Documentation/guides/ about it. BR, Alan On 8/24/21, Tim <t...@jti.uk.com.invalid> wrote: The more time I spend with nuttx the more I think I just haven't found some treasure trove of documentation somewhere. All I seem to end up doing is searching every single file for some kind of clue as to what to do! I have an SPI EEPROM device. Menuconfig allows me to set it up, lovely! I end up with CONFIG_EEPROM=y CONFIG_SPI_EE_25XX=y (Also SPI mode and frequency). Now what.. If I search for either of those CONFIG parameters, the first is not referenced anywhere (apart from my .config), the second confirms that it will include spi_xx25xx.c as a source. Getting there.. It'll be ee25xx_initialize(FAR struct spi_dev_s *dev, FAR char *devname, int devtype, int readonly) I need to call - makes sense. Only there is no explanation, or examples of, how to make that call, and a Google search doesn't help either. Next step will be to look for examples of spi_dev_s and see if I can deduce it somehow. Just how am I supposed to know how to call that initialisation code? Which is why I started this question with the observation that surely I must be missing something somewhere!!?? Yes, it's a bit of a whinge, but also a request for help..please :)