Cortex Issues

Hi, team #3063 here. We’re having problems with our cortex at competition, and since our next competition is States in three weeks, we want to troubleshoot this issue before then. This issue has occurred at two separate competitions one month apart, on different microcontrollers, two completely redesigned robots, same programmer’s computer, a variety of VEXnet keys, and a variety of download methods (programming wire and USB both). We’re a rookie team to VEX so any help at all would be appreciated!

The issue with our microcontroller is that at competition, our program works fine for maybe the first two matches, but by the third or fourth match, the conveyor or shooter in autonomous would stop working, and the next match, most if not all of our motors stop working maybe 10-20 seconds into driver control.

The first time this happened we figured out it was the cortex, so I tried redownloading the master CPU firmware manually but the download would get interrupted and I would get an error msg (see attached).

I tried switching USB cables, vexNET keys, power cycling the cortex, changing the USB ports on my computer, restarting robotc, and restarting my computer, but it didn’t work and we had to switch out the cortex, and by then it was too late for our alliance match ( :frowning: sorry, 2616D and F!).

At the time we wrote it off as the cortex’s fault until our second competition, where the exact same situation happened. The conveyor ( mtr in port 10) lost function first in autonomous, then the following match it did not work at all. Then, our shooter stopped working. Again, when I tried redownloading the firmware, I got the error message. We had to borrow a microcontroller from Robot Revolution (thanks!) and were forced to miss a match with team 7405M ( :frowning: sorry, guys!) as we switched out the microcontroller and redownloaded the firmware and everything. Even after we switched out the microcontroller, our integrated motor encoders still were not working (they returned values of zero) so our motor velocity control program was basically useless and we could no longer shoot accurately.

We thought this issue only happened at competition because in the weeks of testing at home we never came across this problem, and when we got back I first tried to download a program to the corrupted microcontroller to see if it was just competition control or something that was messing up the cortex. When that didn’t work (the error message popped up immediately), I took our sister team’s cortex (which I assumed worked), but then I corrupted that too. I fiddled with the config button and USB cables to get the connection linked again, but in the end, I worked it out by switching the port on my computer, reconfiguring both cortexes, and redownloading the firmwares to each cortex.

The thing is, I distinctly remember testing all of my computer’s USB ports at competition, and that didn’t work then. My computer is really the only constant in all of this (it’s the only computer we program on and download programs from), but I didn’t know it was possible for a USB port to corrupt a microcontroller. I mean we might have kept the same encoders between competitions, but that shouldn’t affect the conveyor. And no other teams seemed to be experiencing issues with ESD, so pretty sure it’s not static either. I really don’t know what it could be. I attached both programs’ pragma config. and also my computer specs, if that helps any. Hope someone can help us out!

1st program pragma config:

#pragma config(Motor,  port2,           leftFront,     tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port3,           rightFront,    tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port4,           leftBack,      tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port5,           rightBack,     tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port6,           wheelLeft,     tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port7,           wheelRight,    tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port8,           conveyorTop,   tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port9,           conveyorBottom, tmotorVex393HighSpeed_MC29, openLoop)
#pragma config(Motor,  port1,          wheelRightHelp, tmotorVex393_HBridge, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#pragma platform(VEX)

//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)



#include "Vex_Competition_Includes.c"   //Main competition background code...do not modify!  

2nd progra pragma config:


#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, I2C_1,  imeWheelR,      sensorQuadEncoderOnI2CPort,    , AutoAssign )
#pragma config(Sensor, I2C_2,  imeWheelL,      sensorQuadEncoderOnI2CPort,    , AutoAssign )
#pragma config(Motor,  port10,           mtrConveyor,   tmotorVex393_HBridge, openLoop, reversed)
#pragma config(Motor,  port2,           leftFront,     tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port3,           rightFront,    tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port4,           leftBack,      tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port5,           rightBack,     tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port6,           leftTop,       tmotorVex393_MC29, openLoop, reversed, encoderPort, I2C_2)
#pragma config(Motor,  port7,           leftBottom,    tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port8,           rightTop,      tmotorVex393_MC29, openLoop, encoderPort, I2C_1)
#pragma config(Motor,  port9,           rightBottom,   tmotorVex393_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//


#pragma platform(VEX)

//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)

#include "Vex_Competition_Includes.c"   //Main competition background code...do not modify!


I have never seen anything like this in my three years of competition. I have dealt numerous issues with cortex’s over the years from my sister teams and other teams in Arizona. One of those being where the cortex itself was corrupted and lost the factory id. My best suggestion is too A) try a different computer, although i doubt that is really the issue or B) go through and reinstall the drivers for the cortex on your computer or C) go through the vexNet firmware updater and have it rewrite the master code on both your cortex and remote. Those three things generally fix all the issues i encounter.

You might want to try updating robotC on the computer as well. My team had a similar problem and updating everything seemed to work.

It could be Windows 10. I have had numerous issues trying to download firmware using Windows 10, and I usually get an error before it dies, but it seems yours went ahead and started downloading. Try using another computer (preferably with Windows 8 or 7) with the same version of RobotC. Download the firmware using that computer and only download code using the Windows 10 PC. This is the solution I found in practice, but @jpearman will probably give a more official solution,

Hmm. I havn’t had much issue with Windows 10. To the OP the newest ROBOTC version is 4.52 and can be find in help-> about ROBOTC.

For the program stopping, we had a similar problem that was caused by a corrupt competition includes file. Have you edited yours?

As for the error, that is a firmware problem, as the others have said.

Thanks for all the help! Ofc unfortunately we can only test this out at states (D:), but to answer some questions, prior to the 2nd competition I updated everything to robotc 4.52 (except I never updated the vexnet drivers, although I’m not sure if this matters). We never touched the competition includes files on my computer.

Does anyone know how to reconfigure the latest cortex? What I’ve been doing is turn the cortex off w battery plugged in, press and hold the “config” button, and while it’s pressed i plug the cortex into my computer and wait for all three lights to turn green. Then I let go of the button and turn the cortex on. I learned this off an old source so not sure if it applies to the cortex I have, and I just want to verify that it works.