0
\$\begingroup\$

I am using a motor controller board from an Asian company. It has an Atmel AT91 and Cyclone II chips on it.

While I have basic experience in using some microcontrollers (PIC, Arduino) and know the basic concepts, it's my first time using an Atmel and an FPGA.

The firmware for this board has many printf() statements in its code. I'd like to know how I can view these messages during use. I know that for an Arduino you can use the serial monitor to view the system.println() statements whereas for a PIC and other microcontrollers you need the development board. Is it the same for this board? It seems to be custom made so I doubt it will "fit-in" on to any development board. The motor driver just receives motor velocities from a laptop connected via a USB cable and drives them. I do not see any statements being printed on my Laptop terminal so I was wondering how to view these statements. Are there any software tools for Atmel or is there something else that I'm not getting?

Edit: I have seen "at91sam7se512-ek" somewhere in the documentation if this means anything

\$\endgroup\$
0
\$\begingroup\$

In most cases, the printf() function's target is one of the UART interfaces of the corresponding chip. So like with the Arduino you could connect a serial monitor to the UART interface. As it's custom made you'd have to figure out from your code if the printf realy is retargeted to the UART and if yes to which one.

\$\endgroup\$
0
\$\begingroup\$

Well, the output of those printf statements has to go somewhere, probably one of the chip's UARTs, but perhaps not the one you're connected to. There are UART and RS485 headers on the board, it could be one of those. Or a debug interface over USB. Or a UART that's dedicated to debugging that is connected to an unpopulated footprint in the board. I would take a look at the source code and try to figure out what interface is associated with the printf statements, then locate that interface on the board.

Edit: looks like the UART connector on there may be the ticket. The page you linked says:

2013年8月現在のファームウェアでは、UARTインタフェースはデバッグ用に使用しています。

According to that, as of the August 2013 firmware, the UART interface is used for debugging. So unless they changed that, you should be able to connect a TTL level USB UART cable to that and see all the messages.

\$\endgroup\$
  • \$\begingroup\$ Thanks. This is so helpful. I just have another question. Any idea if after plugging in the cable, will I see the messages in the same terminal that sends motor commands or in a different terminal? \$\endgroup\$ – Marco Emerson May 28 '18 at 8:07
  • \$\begingroup\$ I think there will be two separate interfaces, the USB interface for sending commands and the UART interface for viewing the debug messages. \$\endgroup\$ – alex.forencich May 28 '18 at 20:28
  • \$\begingroup\$ Thanks. I'll post my progress here after I get a USB UART cable \$\endgroup\$ – Marco Emerson May 29 '18 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.