Electrical – the difference between programing with JTAG and USART interfaces

computersjtagprogramminguart

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."

Best Answer

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.