Question on Bootloaders

Hello,

I am programming an Atmega328P standalone. I am using the minicore library which offers several different clock options, internal, external, speeds, etc.

My questions are:

  1. I noticed that I can also burn the fuses to set these options. What is the difference? Does the library re set those fuses or does wiritng the fuses overfule everything?

  2. Is there any difference in fuses between the Atmega328P and 328PB? I cannot find anythign online or in the datasheet. Fuse calculators all only refer to the P version.

  3. Bonus question, if i set it to run external clock and dont provide an external clock (basically give it no clock singal) will the MCU even run or have any basic functions whatsoever?

Thanks!!

  1. the "burn bootloader" option will set the fuses, and if you have selected the option to use a bootloader, will also write the bootloader as well. Fuses are only set when doing Burn Bootloader from the IDE, or when manually calling avrdude to set the fuses. Uploading normally will not set the fuses.
  2. I don't think there is any difference. The PB is new and less commonly used, so many of the fuse calculators may not have been updated to support it.
  3. Unlike most AVRs, the PB has CFD (clock failure detection), it will run from the 128kHz internal oscillator if it doesn't get an external clock and is set to use one - however, most ISP programmers will try to use an SCK clock speed that is too fast, and will not work correctly.
  1. I noticed that I can also burn the fuses to set these options. What is the difference? Does the library re set those fuses or does wiritng the fuses overfule everything?

Setting the options does not changes the fuses UNLESS you do a burn bootloader; they only tell the IDE to compile the user sketch as if those fuses were set.

  1. Is there any difference in fuses between the Atmega328P and 328PB? I cannot find anythign online or in the datasheet. Fuse calculators all only refer to the P version.

The PB has one additional fuse, CFD, in the extended fuse byte. Compare data sheets, in the "memory programming" section.

  1. Bonus question, if i set it to run external clock and dont provide an external clock (basically give it no clock singal) will the MCU even run or have any basic functions whatsoever?

Normally it will fail to run.
The new CFD fuse can be set (or perhaps unset) to turn on "Clock Failure Detection." If CFD is enabled, and the external clock fails, the chip will revert to the default (8MHz, div8) clock configuration.

Thanks so much guys for the comments and helping my clarify!!