Function of L LED during upload?

Edited to Add: This question is for the UNO R4 WiFi board.


I noticed that when uploading a sketch using the IDE, not only do the Rx and Tx LEDs blink (as expected), but in addition, the L LED always turns on as soon as the IDE "Uploading" status message is displayed. The L LED brightness varies during the upload process, and the three LEDs (L, Rx, and Tx) seem to all turn off simultaneously about 1 second before the "Done uploading" message is displayed in the IDE.

To be clear, the above behavior is observed when uploading sketches that do not address the LED_BUILTIN pin (it even happens when uploading a new sketch to which no code has been added).

My question is: What is the meaning of the L LED during upload? I assume that the behavior I am observing is normal, and that the L LED provides some kind of diagnostic information about the status of he upload process. However, I can find no documentation about the L LED function during upload. Can anybody provide any insight (or point me to the relevant documentation)?

Edit: didn't notice until now that you were referring to the R4. Consult that schematic.

According to the Arduino Uno R3 schematic the L LED flickers when there is activity on the SCK line (the SPI bus is in use), or programmatic changes on PDB5 (digital pin 13).

Thank you for your response. It took me a few minutes to track down the R4 schematics, but this appears to be the pertinent section:

The wiring seems quite different from what was used in the R3, but I do see the "SCK LED" label — and the R4 datasheet further describes DL4 as "LED SCK (serial clock)".

However, none of the labels on the MOSFET gate say "SCK", and I can't really figure out what the diagram is telling me. Does the DL4 ("L") LED light up any time the P102, SP10, RSPCK, GPT2, B, CAN0, or RX signals go HIGH?

I also see the following in the pinout diagram from the datasheet, which seems relevant (as the D13 pin is the LED_BUILTIN pin):

image

I don't yet have sufficient expertise to understand the difference or relationship between the three color-coded labels in the above diagram (D13, P102, RSPCKA), but the presence of "P102" and "RSPCKA" labels on the MOSFET gate int he circuit schematic seems to be consistent with the fact that we can control the L LED by addressing the D13 pin.

This doesn't directly answer my original question though. Perhaps I can deduce that the L LED turns on whenever the RX LED is on, but there are definitely other inputs the affect the L LED (since L and RX are not synchronized during upload).

Any further pointers would be appreciated.

Correct. They all map to pin 46 of the MCU.

Capture

OK, thank you for that additional piece of information. But what are the practical implications as far as my original question? Other than when RX is HIGH, what causes MCU Pin 46 to go HIGH during upload?

Can some statement be made in plain English, to the effect that "during upload, the L LED is lit while XXXX is true" (XXXX = while serial communication is active, perhaps? or while the received data is being written?)?

Assuming the source to the R4's bootloader is available, you could always just look in there to see under which conditions it's active.

When any of those alternative functions of pin 46 causes that pin to go HIGH. There is no simpler answer to your question.

What would be the easiest way for me to determine the functions of P102, SP10, RSPCK, GPT2, B, and CAN0? Is there some comprehensive reference that would provide this infomration in one place, or will it take hunting and pecking for scraps of information about each signal individually?

Or, perhaps a simpler approach — assuming that your original high-level response for the R3 is also valid for the R4:

What is the SPI bus, and would it normally be in use during (but neither before nor after) code upload? — provided that the running program does not contain any instructions that would cause the SPI bus to be in use, of course.

And is it reasonable to assume that also on the R4, "the L LED flickers when there is activity on the SCK line" (based only on the fact that DL4 is described as "SCK LED")?

Probably not. Why do you care?

What is the SPI bus,

One of the several serial bus interfaces in common use with microprocessors, often used to access sensor data, SD cards, etc. and with some MCUs, for device programming.

The purpose of the L LED fading in and out during uploading is to provide a visual indication that the bootloader is running. That is all. And this topic no longer serves any useful purpose.

Because consulting a single source would be easier than tracking down each individual signal, or pestering everybody with endless questions on the forum.

Well, thank you. A source would have been nice, but that is exactly the type of answer I was looking for.

Maybe we should defer to OP on that...