Re: Booting NuttX on SAMA5D27-XULT

2019-12-27 Thread Adam Feuer
Greg, Ok, here's the SAMA5 UART selection and typo fix PR: https://github.com/apache/incubator-nuttx/pull/13 I fixed the rest of the UARTs too. Will you let me know if you have improvements? I am happy to update the PR. cheers adam On Fri, Dec 27, 2019 at 3:58 PM Adam Feuer wrote: > On Fri,

Re: Booting NuttX on SAMA5D27-XULT

2019-12-27 Thread Adam Feuer
On Fri, Dec 27, 2019 at 3:39 PM Gregory Nutt wrote: > #define PIO_UART2_RXD PIO_UART2_RXD_3 > #define PIO_UART2_TXD PIO_UART2_TXD_3 > I'll try that and revert the pinmap.h files. > Certainly you need to remove the '1' form '# undef SAMA5_HAVE_DBGU_CONSOLE > 1' in any case. > Thank for catchin

Re: Booting NuttX on SAMA5D27-XULT

2019-12-27 Thread Gregory Nutt
Looks like the SAMA5D2x PIO controller differs from the SAMA5D3x and D4x PIO controllers. So the PIO/ISR configuration probably needs to be updated. I'm giving this a shot, but not sure how best to tackle this. Should I look at the Linux4SAM code? Or is reading the datasheet the best way to go?

Re: Booting NuttX on SAMA5D27-XULT

2019-12-27 Thread Gregory Nutt
Does NSH wait for an interrupt from the UART to read data? If so, maybe the SAMA5D27 isn't interrupting. I tried to enable PIOD interrupts, since UART2 is on PIOD, but got some compilation errors. I'll look at it more tomorrow. Yes, if you don't have RX interrupts, nothing will be read.  If y

Re: Booting NuttX on SAMA5D27-XULT

2019-12-27 Thread Gregory Nutt
I got this to appear on UART2: NuttShell (NSH) Welcome to NuttX on the SAMA5D27-XULT :) nsh> But it doesn't accept any input. Here's the changes I had to do to make it get this far: https://github.com/apache/incubator-nuttx/compare/master...adamfeuer:feature/sama5d27-xult-improvements Th

Re: Booting NuttX on SAMA5D27-XULT

2019-12-27 Thread Adam Feuer
Greg, This Microchip Atmel Github repo atmel-software-package has a bunch of example code for configuring the PIOs and interrupts for SAMA5D2 and SAMA5D3. It's seems different from the NuttX SAMA5 D2 and D3/D4 code. >From looking at this repo,

Re: Booting NuttX on SAMA5D27-XULT

2019-12-27 Thread Adam Feuer
Looks like the SAMA5D2x PIO controller differs from the SAMA5D3x and D4x PIO controllers. So the PIO/ISR configuration probably needs to be updated. I'm giving this a shot, but not sure how best to tackle this. Should I look at the Linux4SAM code? Or is reading the datasheet the best way to go? Dec

Re: Booting NuttX on SAMA5D27-XULT

2019-12-27 Thread Adam Feuer
Does NSH wait for an interrupt from the UART to read data? If so, maybe the SAMA5D27 isn't interrupting. I tried to enable PIOD interrupts, since UART2 is on PIOD, but got some compilation errors. I'll look at it more tomorrow. cheers adam On Thu, Dec 26, 2019 at 11:46 PM Adam Feuer wrote: > I

Re: Booting NuttX on SAMA5D27-XULT

2019-12-27 Thread Adam Feuer
I got this to appear on UART2: NuttShell (NSH) > Welcome to NuttX on the SAMA5D27-XULT :) > nsh> > But it doesn't accept any input. Here's the changes I had to do to make it get this far: https://github.com/apache/incubator-nuttx/compare/master...adamfeuer:feature/sama5d27-xult-improvements So

Re: Booting NuttX on SAMA5D27-XULT

2019-12-26 Thread Adam Feuer
Greg, Ok, I wired up an FTDI USB converter to UART0... PB27 (UTXD0) and PB26 (UTXR0). That also didn't work. H. I'll think about it some more. Thanks again for the help. cheers adam On Thu, Dec 26, 2019 at 6:30 PM Gregory Nutt wrote: > > > Ok, I used the menuconfig system to set the seria

Re: Booting NuttX on SAMA5D27-XULT

2019-12-26 Thread Gregory Nutt
Ok, I used the menuconfig system to set the serial console to UART1, 57600 baud rate. The system boots, hits the nsh_main breakpoint, I can continue to fputs, and then if I continue, then break, the system stops in the idle loop. So it seems like it's running, but the serial console isn't work

Re: Booting NuttX on SAMA5D27-XULT

2019-12-26 Thread Adam Feuer
Greg, Ok, I used the menuconfig system to set the serial console to UART1, 57600 baud rate. The system boots, hits the nsh_main breakpoint, I can continue to fputs, and then if I continue, then break, the system stops in the idle loop. So it seems like it's running, but the serial console isn't w

Re: Booting NuttX on SAMA5D27-XULT

2019-12-26 Thread Adam Feuer
Greg, Thanks, I'll try this. Sorry about the two emails with the same question, after I sent the first question, I thought the subject line and question might have been unclear. -adam On Thu, Dec 26, 2019 at 4:37 PM Gregory Nutt wrote: > > > In the menuconfig system I looked for a way to get a

Re: Booting NuttX on SAMA5D27-XULT

2019-12-26 Thread Gregory Nutt
In the menuconfig system I looked for a way to get an NSH prompt on UART2,but didn't find it. Is there a way to do that? If so, how? The standard NSH output goes to /dev/console.  For serial devices that is controlled by the setting: CONFIG_SERIAL_UARTn_CONSOLE=y this is in the drivers/s

Booting NuttX on SAMA5D27-XULT

2019-12-26 Thread Adam Feuer
Hi, I can compile and boot NuttX on the SAMA5D27-XULT if I disable the DBGU. There is no DBGU serial port on this chip. On the SAMA5D27-XULT this appears to be connected to UART2 via a factory programmed AT32UC3A4256HHB. In the menuconfig system I looked for a way to get an NSH prompt on UART2, b