Topics

shell doesn't accept input – Arduino Due

adam@...
 

Hi,

Zephyr newbie here. I am trying to get a shell running on the Arduino Due. I can compile and flash samples/subsys/shell/shell_module on my Arduino Due. I am using Ubuntu Linux.

Connected to the Due's Programming Port using picocom, I can see output and the shell prompt. However, when I try to type something, the shell appears hung– it doesn't accept any input. It appears the UART is not accepting input.

Is this sample known to work on the Arduino Due?

I tried to do some printk() debugging– the Arduino seems to know it's getting characters, but the actual character is not supplied to the shell...

Does anyone have any ideas on how to get this working?

cheers
adam
--
Adam Feuer <adam@...>

Adam Feuer <adam@...>
 

I can output characters on the UART0 just fine using printk(). The shell also seems to be able to do output since I see a prompt. I know I can build working software since I built a posix version of the shell examples and they work.

When I send a character to the Arduino Due using Picocom, the UART0 interrupt fires. But when I try to read from the UART0 UART_RHR, I get zero. And if I check the uart->UART_SR, it shows UART_SR_FRAME – a framing error.

The Arduino Due board can read characters just fine from the Arduino software, if I flash an Arduino sketch; or from NuttX RTOS if I build that and flash it onto the board. So the hardware is good. It seems to be something related to how Zephyr configures the board. I've been reading the uart init code and board init code to see what's wrong with it, but can't find a problem.

I have a Segger J-Link debugger and cable I can use with the Arduino Due, but not sure what to look for.

If anyone has ideas on how to debug this, I would love to know them!.

cheers
adam


On Sat, Jan 4, 2020 at 10:38 PM Adam Feuer <adam@...> wrote:
Hi,

Zephyr newbie here. I am trying to get a shell running on the Arduino Due. I can compile and flash samples/subsys/shell/shell_module on my Arduino Due. I am using Ubuntu Linux.

Connected to the Due's Programming Port using picocom, I can see output and the shell prompt. However, when I try to type something, the shell appears hung– it doesn't accept any input. It appears the UART is not accepting input.

Is this sample known to work on the Arduino Due?

I tried to do some printk() debugging– the Arduino seems to know it's getting characters, but the actual character is not supplied to the shell...

Does anyone have any ideas on how to get this working?

cheers
adam
--
Adam Feuer <adam@...>


--
Adam Feuer <adam@...>