0
\$\begingroup\$

I understand there are 2 interfaces to programming NanoMind A712 computer: JTAG and USART. But what is the difference in programming the computer in JTAG or USART interfaces?

Datasheet: See page 10: "The NanoMind computer is equipped with a diagnostics interface enabling software upload to the on-board code storage and interaction with the computer via a simple console-like debugging screen."

\$\endgroup\$
  • 2
    \$\begingroup\$ Hm. The interface difference is not enough of a difference? \$\endgroup\$ – Eugene Sh. Aug 16 '17 at 14:08
  • \$\begingroup\$ The difference is the USART method relies on a software running on the computer. For example the boot loader. That one receives the data and does the programming. Whereas JTAG programming doesn't need this as it's implemented in hardware. \$\endgroup\$ – Janka Aug 16 '17 at 14:28
  • \$\begingroup\$ @Janka, I was thinking that, but this is some ARM thing. I'm not sure exactly what chip they have, but it looks there might be an USART connected directly to a debug unit. \$\endgroup\$ – uhours Aug 16 '17 at 14:36
  • \$\begingroup\$ @uhours any debugging via UART will be intrusive and not a direct connection to the on-chip debug module. The block diagram shows a connection to an external diagnostic unit which won't be the on-chip debug. In fact I bet that is just a serial terminal! \$\endgroup\$ – DiBosco Aug 16 '17 at 14:40
  • \$\begingroup\$ Thanks you for your helpful comments, except for Eugene Sh comment. \$\endgroup\$ – eduardosufan Aug 16 '17 at 14:51
4
\$\begingroup\$

The JTAG is a synchronous interface that uses built-in hardware to program the flash. The USART interface is an asynchronous interface that uses a bootloader, which is a program that runs in memory, takes in the new code received over the UART and programs other areas of memory. The bootloader usually sits at the bottom or top of memory and is never erased.

Sometimes the bootloader will download the new code into an area of memory and once it is all received, then reprogram the device. Other times, when the bootloader is small enough, it will erase the existing program and reprogram the main memory on the fly.

The JTAG interface also enables you to do non-intrusive debugging by giving you access to the on-chip debug module.

It is often the case that the initial code is written using the JTAG interface as it is faster and gives you the opportunity for debugging, including access to registers, read memory etc. Once the unit is in the field, a UART (or, for example CAN module, USB, Ethernet interface) may be used to reprogram the code via the bootloader so that a non technical person can update the code.

Edit: I should add I have seen some processors with a built-in bootloader that lives in ROM, but it is still a piece of software, not like a JTAG interafce.

\$\endgroup\$
  • \$\begingroup\$ It's possible to program FLASH using USART? Or USART just can program RAM memory? \$\endgroup\$ – eduardosufan Aug 16 '17 at 14:40
  • \$\begingroup\$ Yes, you can program the flash via the UART, but it is the bootloader doing it in software. \$\endgroup\$ – DiBosco Aug 16 '17 at 14:42
  • \$\begingroup\$ Other documentation mention: "If you wish to write the program to flash, you will need generally need to use the JTAG interface." I don't know what is the meaning of "generally need".... We have tried to program FLASH using USART without success (we think maybe a bug of the software used to program). \$\endgroup\$ – eduardosufan Aug 16 '17 at 14:49
  • \$\begingroup\$ @eduardosufan I'm a little confused. You said above "Also, I can tell you we have programmed the computer using USART interface.", but here you say "We have tried to program FLASH using USART without success". Are you syaing you have only programmed RAM with the USART? \$\endgroup\$ – DiBosco Aug 16 '17 at 14:51
  • \$\begingroup\$ Exactly, we have programmed only RAM memory using USART interface. \$\endgroup\$ – eduardosufan Aug 16 '17 at 15:58

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.