If you have enabled the JTAG pin sharing option in MAX® 10 devices for internal configuration without assigning the 4 JTAG pins as single-ended I/O pins or voltage-referenced I/O pins, the JTAG pins will become unused I/O and will default to input tri-state in user mode and thus will not function as dedicated JTAG pins. In this case, the Quartus® Prime programmer will not be able to access the device over JTAG.
To regain access to the JTAG pins, hold either nCONFIG, nSTATUS or CONF_DONE pins low when reprogramming your device. This will prevent internal configuration from being successfully executed. You may then erase the CFM content from the device by holding either one of these pins low throughout the erase process. Once the erase is complete, you will then be able to regain access to the JTAG pins.
If you do not want to use the MAX 10 JTAG pins as user I/O, ensure that the “enable JTAG pin sharing” option is not checked in the Quartus Prime software.