My students frequently see a problem running a very simple program from the debugger where the motors stop being driven by the firmware. The code is shown in the image below. startMotor is just a simple wrapper function to set the speed value in the motor port:( aka motor[motorPort] = speed;)
Normally the code works fine and the motors run, but in some instances, the debugger will step through the program and when it does you can see the motor being given a power value in the debugger window, yet the firmware does not seem to actually be providing power to the motor which does not spin. If the cortex is disconnected from the debugger, the power turned off and the usb cable removed, when powered back on the program loaded on the cortex will then run the motors. Connecting back to the usb cable, re-downloading the program, and attempting to run again using the debugger does not usually heal this problem, however, reloading the RobotC firmware manually does.
I am using VEX EDR with RobotC code 4.5.5, Master CPU firmware CORTEX_V4_25, and RobotC firmware Vex_Cortex_10_55. My platform type is set to Vex 2.0 Cortex and have Natural Language PLTW enabled. Communication mode is USB Only.
I have seen this problem on a number of different cortex, with fully charged batteries, with the motors in different ports (such as 2 or 7), with different motor controllers, and do not believe that the fuse is tripping on the motors which are not locked up. I have also seen this problem with the debugger being able to read from various sensors and in a similar way a manual firmware update usually heals things up.
After a bit of experimentation, I can force this problem to occur by unplugging the usb cable after successfully running the program. Even after a power cycle, re-downloading the code and re-starting the debugger the problem behavior persists until the firmware is reloaded.
Once you unplug the USB cable in USB only mode is there no way to restart and use the debugger back on the cable unless you reload the firmware?