4.4.17 TinyX-OCD (UPDI) Special Considerations
The UPDI data pin (UPDI_DATA) can be a dedicated pin or a shared pin, depending on the target AVR device. A shared UPDI pin is 12V tolerant, and can be configured to be used as /RESET or GPIO. For further details on how to use the pin in these configurations, see UPDI Physical Interface.
On devices which include the CRCSCAN module (Cyclic Redundancy Check Memory
Scan), this module should not be used in Continuous Background mode while debugging. The
OCD module has limited hardware breakpoint comparator resources, so BREAK
instructions may be inserted into Flash (software breakpoints) when more breakpoints are
required, or even during source-level code stepping. The CRC module could incorrectly
detect this breakpoint as a corruption of Flash memory contents.
The CRCSCAN module can also be configured to perform a CRC scan before boot. In the case of a CRC mismatch, the device will not boot, and appear to be in a locked state. The only way to recover the device from this state is to perform a full chip erase and either program a valid Flash image or disable the pre-boot CRCSCAN. (A simple chip erase will result in a blank Flash with invalid CRC, and the part will thus still not boot.) The software front-end will automatically disable the CRCSCAN fuses when chip erasing a device in this state.
When designing a target application PCB where UPDI interface will be used, the following considerations must be made for correct operation:
- Pull-up resistors on the UPDI line must not be smaller (stronger) than 10kΩ. A pull-down resistor should not be used, or it should be removed when using UPDI. The UPDI physical is push-pull capable, so only a weak pull-up resistor is required to prevent false Start bit triggering when the line is idle.
- If the UPDI pin is to be used as a RESET pin, any stabilizing capacitor must be disconnected when using UPDI, since it will interfere with correct operation of the interface
- If the UPDI pin is used as RESET or GPIO pin, all external drivers on the line must be disconnected during programming or debugging since they may interfere with the correct operation of the interface