Shared SPI lines

In the Atmel's 'AVR Hardware Design Considerations' [ link ] document, page 6, item 4.1.1, it states:

Shared use of SPI programming lines If additional devices are connected to the ISP lines, the programmer must be protected from any device, other than the AVR, that may try to drive the lines. This is especially important with the SPI bus, as it is similar to the ISP interface. Applying series resistors on the SPI lines, as depicted in Figure 4-2, is the easiest way to achieve this.

However, there is no mention anywhere of what size those resistors should be. Anyone want to take a gander at this?

Will have you have a device driving any SPI lines while the processor is programmed?

Whether I do or not, I'm not wanting to know the information because of whatever I may be building. I'm just curious as to what those resistors could or should be. The datasheet seems lacking that information.

Personally, I can't immediately think of a situation where I'd have another device driving the SPI lines while the MCU is being programmed. If that would ever be a possibility, I'd just add a cut off toggle switch and be done with it. Maybe just kill the power on the other device to keep the lines clear of traffic so to speak.

The series resistors are used to limit the current to a safe level. For example, assume an external device is sourcing MOSI to VCC. To function correctly, the programmer needs to be able to sink MOSI to GND and source MOSI to VCC. Obviously, if the external device is sourcing MOSI to VCC and the programmer is trying to sink MOSI to GND something is going to fry. If the programmer is another AVR processor then a reasonable series resistor in this scenario is 250 ohms (5V / 0.020A).

Contrast that scenario with a 10K pull-up resistor connected to MOSI. A series resistor is not necessary. The programmer will be able to sink MOSI with very little current flow.

Gotcha. I can't immediately think of a scenario where I'd have that setup where something other than the device itself is also sourcing the SPI lines. But it's nice to know what to do in a situation like that.